[FFmpeg-devel] [RFC] mpeg4 parser do not split of sequence end code

Joakim Plate elupus
Tue Jun 22 21:35:46 CEST 2010

M?ns Rullg?rd <mans <at> mansr.com> writes:

> Reimar D?ffinger <Reimar.Doeffinger <at> gmx.de> writes:
> > Hello,
> > currently the parser ends up putting a sequence end marker at the very end
> > of a file into a separate packet.
> > As a result, the decoder then complains about not being able to find proper
> > frame headers.
> > The solutions I saw:
> > 1) Do not care about that
> > 2) Make the decoder ignore packets that contain only a sequence end code
> > 3) Make the parser keep the sequence end code together with the previous
> >    frame if any.
> >

> 4) Drop sequence end codes entirely, but that's probably not a good
> idea.
> I prefer 3.

I suspect the original reason for this is to handle still frames in DVDs 
properly. The only thing signifying them was a GOP end code. After that no data 
at all on that stream even if there was audio data on another stream.

So to force the decoder to actually output the last picture in it's buffer, this 
last package is output.

I don't think option 3 will make the video decoder output the last frame since 
this will not happen at EOF.


More information about the ffmpeg-devel mailing list