Re: [FFmpeg-devel] [PATCH] avcodec/mss4: Fix memleaks upon allocation error

2020-11-06 Thread Andreas Rheinhardt
Andreas Rheinhardt: > 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_

[FFmpeg-devel] [PATCH] avcodec/mss4: Fix memleaks upon allocation error

2020-11-04 Thread Andreas Rheinhardt
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