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

Reimar Döffinger Reimar.Doeffinger
Mon Aug 23 18:50:38 CEST 2010

On Mon, Aug 23, 2010 at 04:51:09PM +0200, Laurent Aimar wrote:
> > Laurent Aimar:
> > >  Unless I misunderstood the current code, avcodec will consume the first
> > > field, properly decode it and return no pictures and no errors. If so, it
> > > seems the right behavior to me.
> > 
> > You understood it correctly. The question is if it should be a task of the
> > decoder to call for more data.
>  The current code already does it. It consumes all bytes and return no pictures.
> Obviously, more data are needed to have a frame ready.

Not really, it could be e.g. due to decoder delay.
Or as for MPEG-4 it could be because it was a all-skip VOP.
I suggested to make it return an error, because for the
FFmpeg API passing such an incomplete frame to the decoder
actually is an error.
Unfortunately our parser means we have that error all the time
if we use libavcodec with our AVParser for H.264...

More information about the ffmpeg-devel mailing list