From b3ab319944821c379b8040125e931724c229654b Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Wed, 12 May 2010 17:05:56 +0000 Subject: Set coded_frame to NULL when closing a codec, since it might be invalid after the codec is "gone". Originally committed as revision 23101 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 87facec8f4..3badebe9bd 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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); -- cgit v1.2.3