summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0b0c562deb..a66b85e9ad 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -685,6 +685,8 @@ av_cold int avcodec_close(AVCodecContext *avctx)
avctx->codec->close(avctx);
avcodec_default_free_buffers(avctx);
av_freep(&avctx->priv_data);
+ if(avctx->codec->encode)
+ av_freep(&avctx->extradata);
avctx->codec = NULL;
entangled_thread_counter--;