# HG changeset patch # User reimar # Date 1273683956 0 # Node ID 25ed714369745aa59f77ecdf7f7253e54211cbb3 # Parent 7ca3795af11b502727cab76b9daaec8718691046 Set coded_frame to NULL when closing a codec, since it might be invalid after the codec is "gone". diff -r 7ca3795af11b -r 25ed71436974 utils.c --- 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);