提交 77a670e7 编写于 作者: C Craig Thomasson 提交者: Benoit Fouet

Fix segfault when encoder initialization fails.

Patch by Craig Thomasson $(name) dot $(surname) ripcode com

Originally committed as revision 22811 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 2100348c
......@@ -710,7 +710,7 @@ 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)
if(avctx->codec && avctx->codec->encode)
av_freep(&avctx->extradata);
avctx->codec = NULL;
entangled_thread_counter--;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册