]> git.sesse.net Git - ffmpeg/commit
avformat/smacker: Create audio streams immediately
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 29 Mar 2020 06:19:45 +0000 (08:19 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 8 Apr 2020 14:04:37 +0000 (16:04 +0200)
commit33bc45e4fca3d68b2bd4fb20c2c87f4f05f3d55e
tree54ad5bdfedb765873fec1ef77abebc18d3c48227
parent7885c7357361c387bd63b797875dc6759eedd1bc
avformat/smacker: Create audio streams immediately

The Smacker demuxer currently parses several fields that indicate
how many audio streams a file contains. This data is parsed and stored
into arrays in the demuxer's context and although the data is used only
to initialize the audio streams, it is kept for the whole lifetime of
the demuxer.

This has been changed: The data is used directly to create
the audio streams and no longer kept at all.

This also simplifies error handling in case adding a new stream fails:
Several arrays which until now have been allocated between parsing the
data determining how many audio streams to create and actually creating
them would need to be freed in this case. Now the streams are created
first, so freeing is no longer an issue.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/smacker.c