OSDN Git Service

flvdec: do not create any streams in read_header()
authorAnton Khirnov <anton@khirnov.net>
Sun, 11 Oct 2015 09:08:24 +0000 (11:08 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sat, 12 Dec 2015 20:26:48 +0000 (21:26 +0100)
commit09ae7b81ea2051eec2be9964296bd6ef492c6622
tree091240d092e9e41f0e46f1cc72d2d9111ee34eec
parentde9e199a039473ebe4b1b87382e3064d0ea2cf02
flvdec: do not create any streams in read_header()

The current muxer behaviour is to create streams in read_header() based
on the audio/video presence flags, but fill in the stream parameters
later when we actually get some packets for them. This is rather shady,
since other demuxers set the stream parameters immediately when the
stream is created and do not touch the stream codec context after that.

Change the flv demuxer to behave in the same way as other similar
demuxers -- create the streams only when we get a packet for them.
libavformat/flvdec.c