[Ffmpeg-devel] [PATCH] support S302M streams in MPEG TS

Baptiste Coudurier baptiste.coudurier
Wed Dec 13 10:56:57 CET 2006


Hi

Reimar D?ffinger wrote:
> Hello,
> 
> I just noticed something that annoys me quite a bit:
> 
> On Fri, Dec 01, 2006 at 11:58:21AM +0100, Baptiste Coudurier wrote:
>> +    if (s->frame_size > 0) {
>> +        memcpy(s->inbuf_ptr, buf, buf_size);
>> +        s->inbuf_ptr += buf_size;
>> +        if (s->inbuf_ptr - s->inbuf == s->frame_size) {
> 
> Why this buffering? It costs speed, adds complexity and is completely
> unneeded for the daud demuxer, isn't it?
> That kind of thing (i.e. framing) is what AVParsers are usually there
> for.

It is needed for AES3 in TS, since you get PES packets, and not whole
frame, S302M is Mapping AES3 stream into TS.
AVParser cannot be used here: codec_id differs and we do not know
codec_id before the actual parsing begins.

Memcpy should not be needed for the .302 file, however.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list