mirror of https://git.ffmpeg.org/ffmpeg.git
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
This commit is contained in:
parent
7ed63ca2e7
commit
c4f267ab75
|
@ -685,6 +685,8 @@ av_cold int avcodec_close(AVCodecContext *avctx)
|
||||||
avctx->codec->close(avctx);
|
avctx->codec->close(avctx);
|
||||||
avcodec_default_free_buffers(avctx);
|
avcodec_default_free_buffers(avctx);
|
||||||
av_freep(&avctx->priv_data);
|
av_freep(&avctx->priv_data);
|
||||||
|
if(avctx->codec->encode)
|
||||||
|
av_freep(&avctx->extradata);
|
||||||
avctx->codec = NULL;
|
avctx->codec = NULL;
|
||||||
entangled_thread_counter--;
|
entangled_thread_counter--;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue