]> git.sesse.net Git - ffmpeg/commit
avcodec/mss4: Fix memleaks upon allocation error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 3 Nov 2020 22:43:01 +0000 (23:43 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 6 Nov 2020 12:57:49 +0000 (13:57 +0100)
commit4b4c7d6e1a700ef6b784b2f0b093e200ed049c20
treee18a8cb199de1788eeab3acb83e0feff88dd90c2
parenta125e081307d1cb3e84eee61fd0485dac317877b
avcodec/mss4: Fix memleaks upon allocation error

During init the mts2 decoder allocates several VLCs and then several
buffers in a loop; if one of the latter allocations fails, only the VLCs
are freed, not any buffers that might already have been successfully
allocated. This commit fixes this by setting the
FF_CODEC_CAP_INIT_CLEANUP flag.

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