[FFmpeg-devel] [PATCH] Fix return value for incomplete H264 frame packets

Reimar Döffinger Reimar.Doeffinger
Tue Aug 24 20:28:38 CEST 2010

On Tue, Aug 24, 2010 at 09:31:50AM +0200, Laurent Aimar wrote:
> Hi,
> On Tue, Aug 24, 2010 at 08:09:34AM +0200, Reimar D?ffinger wrote:
> > On Tue, Aug 24, 2010 at 02:11:17AM +0200, Michael Niedermayer wrote:
> > > H264 & H222 describe when each field should be displayed. Or in other words
> > > they decribe how to calculate a timestamp for each field
> > > about 1/4 of the code needed on the lavf side has been implemented
> > > until the remaining code is implemented and it all is free of bugs it will
> > > not always work
> > 
> > The timestamp stuff is all nice and well for normal playback,
> > but it doesn't help to keep the -fps feature of MPlayer working
> > that plays the video as if it was captured at a fixed frame rate.
> > That's the main reason why I don't just want to switch to some
> > other timing method even if it would fix the issue for most users.
>  For that feature, what are the issues with simply counting the frames output
> by the decoder?

That doesn't work due to
a) 0-sized packets in AVI
b) MPEG4 non-coded VOPs
both of which need to be counted for this purpose but do not output frames.
Of course it is possible to add special-cases to applications to handle this,
but a solution in libavcodec that can be shared seems preferable to me.

More information about the ffmpeg-devel mailing list