summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-05-12 17:05:56 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-05-12 17:05:56 +0000
commitb3ab319944821c379b8040125e931724c229654b (patch)
tree26838443cc36d8f6cf531cb689de7c392b221ff8
parent521cfa4aaea59b9c3ea85019aa05171635fddfe7 (diff)
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
-rw-r--r--libavcodec/utils.c1
1 files changed, 1 insertions, 0 deletions
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);