[FFmpeg-devel] [PATCH]: Fix decoding of mpegts streams with h264 video that does *NOT* have b frames

Mike Scheutzow mjs973 at optonline.net
Sat Apr 30 13:59:26 CEST 2011

Mike Scheutzow wrote:
> This problem was more difficult to solve than I expected. I've 
> attached a patch which takes a different approach than Tony's patch.
> One of the causes of this bug is that the h264 parser defaults 
> low_delay to 1, but the h264 codec defaults low_delay to 0. Really Ugly.
> After many hours of looking at this, I'm still not sure how 
> has_b_frames is *intended* to behave, but to me the implementation 
> appears way more complicated than it ought to be.
> My patch relies on the encoder to set an optional field in the SPS. 
> This works for libx264 streams, but I'm not sure that all h264 
> encoders will set it.

Michael N - looking for comment from you as maintainer of h264 decoder.

This patch fixes the failure of ffmpeg.c to transcode h264 input which 
is I-P only (no B slices). This patch works with files created by 
libx264 and by rhozet.

I believe trac 88 is this same problem, although it doesn't describe the 
issue in the same way.

If patch ok, you can push.


Mike Scheutzow

More information about the ffmpeg-devel mailing list