[Ffmpeg-devel] Re: [PATCH] PKT_FLAG_B

Michael Niedermayer michaelni
Wed Aug 9 12:40:10 CEST 2006


Hi

On Wed, Aug 09, 2006 at 12:27:57PM +0200, Baptiste Coudurier wrote:
> 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.

patch ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list