[FFmpeg-devel] [PATCH] h264 parser: detect new extradata on frame parsing.

Benoit Fouet benoit.fouet at free.fr
Wed Jul 23 16:34:11 CEST 2014


Hi,

----- Mail original -----
> Am 23.07.2014 15:49 schrieb "Benoit Fouet" <benoit.fouet at free.fr>:
> >
> > Try to detect new extradata when parsing frames, and decode it.
> > Fixes issue #3787
> > ---
> >  libavcodec/h264_parser.c | 34 ++++++++++++++++++++++++++++++++++
> >  1 file changed, 34 insertions(+)

[...]

> Having AVC style extradata in the middle of a stream seems like an
> invalid
> file. The stream should only include NALUs, with start code or with
> size
> prefix, but not random extra data.
> 

I cannot comment on this, my knowledge being very limited.
If you think that the file attached to #3787 is invalid, could you comment on the bug tracker?

> I'm not liking such a hack, especially in the parser, as the decoder
> and
> parser could even use separate context (parsing is typically done in
> the
> demuxing step)
> 

The parser already decodes extradata using the same method (see got_first at the beginning of the same h264_parse function).

-- 
Ben


More information about the ffmpeg-devel mailing list