]> git.sesse.net Git - ffmpeg/commit
avformat/swfenc: Fix memleak upon write_header error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 20 Sep 2020 06:05:58 +0000 (08:05 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 20 Sep 2020 09:14:11 +0000 (11:14 +0200)
commitd554aabdaf81fc3ea99783aca42649b43013e796
treeacfe595b20e396ce56b5419690a7c0a62925cb2c
parenta39fcbdffbcb8192332810d0a9217144560bef9f
avformat/swfenc: Fix memleak upon write_header error

The SWF muxer accepts at most one mp3 audio and at most one VP6F, FLV1
or MJPEG stream. Upon encountering an mp3 stream, a fifo is allocated
that leaks if one of the subsequent streams is incompliant with the
restrictions mentioned above or if the framerate or samplerate are
invalid. This is fixed by adding a deinit function to free said fifo.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/swfenc.c