Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2020-08-02 21:31:22 +0300
committerAndriy Gelman <andriy.gelman@gmail.com>2020-08-02 21:31:22 +0300
commit7c32e9cf93b712f8463573a59ed4e98fd10fa013 (patch)
tree988cc874d44007f795db21eab5eafc7ba2d5f59c /libavcodec/v4l2_m2m_enc.c
parent533d6030ca3e64c87aeb9d04917b716aa8341385 (diff)
avcodec/v4l2_m2m: adapt to call close() on init fail
This fixes several mem leaks when init of encoder/decoder failed. Fixes ticket #8285 Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Diffstat (limited to 'libavcodec/v4l2_m2m_enc.c')
-rw-r--r--libavcodec/v4l2_m2m_enc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c
index 56df4286ad..af0ed1e306 100644
--- a/libavcodec/v4l2_m2m_enc.c
+++ b/libavcodec/v4l2_m2m_enc.c
@@ -429,6 +429,7 @@ static const AVCodecDefault v4l2_m2m_defaults[] = {
.close = v4l2_encode_close, \
.defaults = v4l2_m2m_defaults, \
.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY, \
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, \
.wrapper_name = "v4l2m2m", \
}