Commit c4f267ab authored by Vitor Sessak's avatar Vitor Sessak

Free encoder extradata in avcodec_close(). Should fix several small memory

leaks when encoding (at least for asv, wma and aac).

Fix also issue 1577.

Originally committed as revision 21923 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 7ed63ca2
......@@ -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--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment