Commit 67ffeb92cb for ffmpeg
commit 67ffeb92cb5d1bce4806f9a9fc1f84425be35aef
Author: Zhao Zhili <quinkblack@foxmail.com>
Date: Sun Nov 15 02:19:20 2026 +0800
avcodec/mediacodecenc: fix memleak of the private extradata
Signed-off-by: Zhao Zhili <quinkblack@foxmail.com>
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 507c48df9c..35a2b5337b 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec/mediacodecenc.c
@@ -1003,6 +1003,7 @@ static av_cold int mediacodec_close(AVCodecContext *avctx)
av_bsf_free(&s->bsf);
av_frame_free(&s->frame);
+ av_freep(&s->extradata);
mediacodec_uninit_async_state(avctx);