[Ffmpeg-devel] Re: [PATCH] PKT_FLAG_B

Baptiste Coudurier baptiste.coudurier
Wed Aug 9 12:27:57 CEST 2006


Hi

Michael Niedermayer wrote:
>> [...]
>> +#include "mpegvideo.h"
> 
> i would prefer if muxers wouldnt depend on internal headers of libavcodec

Sure.

> and please use the following to extract the frame type and closed_gop flags
> its much simpler
> 
> uint32_t c=-1;
> for(i=0; i<size+4 && c!=0x100; i++){
>     c = (c<<8) + buf[i];
>     if(c == 0x1B8)
>         closed_gop= (buf[i+4]>>6)&1;
> }
> frame_type= (buf[i+2]>>3)&7;
> 
> [...]

Indeed, thanks, new patch attached. I changed buf[i+2] into buf[i+1] to
make it working and size+4 to size-4, which seems more correct.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gxfenc_parse_mpeg.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060809/33989219/attachment.asc>



More information about the ffmpeg-devel mailing list