[FFmpeg-devel] [PATCH] Treat FLV packets with AVCPacketType zero as extradata

Amarghosh Vadakkoot amarghosh at google.com
Thu Aug 22 10:06:36 CEST 2013


When type zero avc packets are returned as normal video packets, the caller
attempts to parse them as NAL unit and fails. If they are treated as
extra_data and returned in the side_data of next packet, the caller can
easily differentiate between avcC data and NAL units. Apparently this is
currently achieved using a heuristic approach in decode_frame function in
libavformat/h264.c




On Wed, Aug 21, 2013 at 9:16 PM, Michael Niedermayer <michaelni at gmx.at>wrote:

> On Wed, Aug 21, 2013 at 03:16:29PM +0900, Amarghosh Vadakkoot wrote:
> > If the first byte of an FLV packet carrying AVC video is zero, that
> > packet carries AVCDecoderConfigurationRecord instead of NAL units.
> > Treat such packets as extra data instead of normal video data. This
> > is applicable for AAC packets as well, and is already handled as such.
> >
> > Signed-off-by: Amarghosh Vadakkoot
>
> patch breaks flv with resolution changes
> example: https://trac.ffmpeg.org/ticket/499
>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Good people do not need laws to tell them to act responsibly, while bad
> people will find a way around the laws. -- Plato
>



-- 
Thanks and regards,
Amarghosh Vadakkoot


More information about the ffmpeg-devel mailing list