changeset 11712:25ed71436974 libavcodec

Set coded_frame to NULL when closing a codec, since it might be invalid after the codec is "gone".
author reimar
date Wed, 12 May 2010 17:05:56 +0000
parents 7ca3795af11b
children b9354f343d2d
files utils.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Tue May 11 21:31:54 2010 +0000
+++ b/utils.c	Wed May 12 17:05:56 2010 +0000
@@ -709,6 +709,7 @@
     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);