comparison utils.c @ 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 45512d8b6b35
children a37818ac3817
comparison
equal deleted inserted replaced
11711:7ca3795af11b 11712:25ed71436974
707 if (HAVE_THREADS && avctx->thread_opaque) 707 if (HAVE_THREADS && avctx->thread_opaque)
708 avcodec_thread_free(avctx); 708 avcodec_thread_free(avctx);
709 if (avctx->codec && avctx->codec->close) 709 if (avctx->codec && avctx->codec->close)
710 avctx->codec->close(avctx); 710 avctx->codec->close(avctx);
711 avcodec_default_free_buffers(avctx); 711 avcodec_default_free_buffers(avctx);
712 avctx->coded_frame = NULL;
712 av_freep(&avctx->priv_data); 713 av_freep(&avctx->priv_data);
713 if(avctx->codec && avctx->codec->encode) 714 if(avctx->codec && avctx->codec->encode)
714 av_freep(&avctx->extradata); 715 av_freep(&avctx->extradata);
715 avctx->codec = NULL; 716 avctx->codec = NULL;
716 entangled_thread_counter--; 717 entangled_thread_counter--;