diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 4f7280b6d3..d82756b62f 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -124,6 +124,8 @@ X264_close(AVCodecContext *avctx) { X264Context *x4 = avctx->priv_data; + av_freep(&avctx->extradata); + if(x4->enc) x264_encoder_close(x4->enc);