diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-05-12 17:05:56 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-05-12 17:05:56 +0000 |
commit | b3ab319944821c379b8040125e931724c229654b (patch) | |
tree | 26838443cc36d8f6cf531cb689de7c392b221ff8 | |
parent | 521cfa4aaea59b9c3ea85019aa05171635fddfe7 (diff) | |
download | ffmpeg-b3ab319944821c379b8040125e931724c229654b.tar.gz |
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.c | 1 |
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); |