diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-06-17 01:08:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-06-19 12:58:22 +0200 |
commit | 2b2ced61eba03a1afc83e37614c6635ee9f2b551 (patch) | |
tree | 560ce95ad0cfbfc720d5152b92171a898ee35db5 | |
parent | 7fab9b97613e5ec6954fb8118f9ca43f04847cfe (diff) | |
download | ffmpeg-2b2ced61eba03a1afc83e37614c6635ee9f2b551.tar.gz |
avcodec/libvpxenc: Cleanup on error
This or fifo needs to be freed on errors explicitly
Fixes: memleak
Fixes: 68937/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVPX_VP8_fuzzer-4830831016214528
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/libvpxenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 5c7b6e9de7..5490246d9e 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -2042,6 +2042,7 @@ const FFCodec ff_libvpx_vp8_encoder = { FF_CODEC_ENCODE_CB(vpx_encode), .close = vpx_free, .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE | + FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS, .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE }, .p.priv_class = &class_vp8, @@ -2118,6 +2119,7 @@ FFCodec ff_libvpx_vp9_encoder = { FF_CODEC_ENCODE_CB(vpx_encode), .close = vpx_free, .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE | + FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS, .defaults = defaults, .init_static_data = vp9_init_static, |