Commit ecc4bdd7 authored by reimar's avatar reimar

Set coded_frame to NULL when closing a codec, since it might

be invalid after the codec is "gone".


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23101 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 22b4d7e8
......@@ -709,6 +709,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
if (avctx->codec && avctx->codec->close)
avctx->codec->close(avctx);
avcodec_default_free_buffers(avctx);
avctx->coded_frame = NULL;
av_freep(&avctx->priv_data);
if(avctx->codec && avctx->codec->encode)
av_freep(&avctx->extradata);
......
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