[Ffmpeg-devel] [PATCH] set MPEG 1/2 gop timecode frame start number

Baptiste Coudurier baptiste.coudurier
Tue Nov 7 00:29:43 CET 2006


Michael Niedermayer wrote:
> Hi
> 
> On Mon, Nov 06, 2006 at 07:59:25PM +0100, Baptiste Coudurier wrote:
>> Hi
>>
>> This patch add support to set MPEG 1/2 gop header timecode start. Also
>> supports drop frame flag.
> 
> hmm, and what is that good for?
> 

Setting a time code in gop headers. This will be detected as starting
time of the media without interfering with pts.
In broadcast environment, it can be really useful. It's simply a feature
I would say.


> [...]
>> Index: libavcodec/mpeg12.c
>> ===================================================================
>> --- libavcodec/mpeg12.c	(revision 6918)
>> +++ libavcodec/mpeg12.c	(working copy)
>> @@ -346,13 +346,20 @@
>>              }
>>  
>>              put_header(s, GOP_START_CODE);
>> -            put_bits(&s->pb, 1, 0); /* do drop frame */
>> +            put_bits(&s->pb, 1, s->avctx->flags & CODEC_FLAG2_DROP_FRAME_TIMECODE); /* drop frame flag */
> 
> flags & CODEC_FLAG2_DROP_FRAME_TIMECODE uhm
> try !!(flags2 & ...)
> 

Sure.

-- 
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