[FFmpeg-cvslog] utils.c: fix crash with threading enabled.

Ronald S. Bultje git at videolan.org
Tue Jun 7 03:49:11 CEST 2011


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Mon Jun  6 09:27:54 2011 -0400| [ceff045dbecb63bbe42da6d7d33f614ae67fbebd] | committer: Ronald S. Bultje

utils.c: fix crash with threading enabled.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ceff045dbecb63bbe42da6d7d33f614ae67fbebd
---

 libavcodec/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 2b417de..1e58864 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -783,7 +783,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
         avctx->codec->close(avctx);
     avcodec_default_free_buffers(avctx);
     avctx->coded_frame = NULL;
-    if (avctx->codec->priv_class)
+    if (avctx->codec && avctx->codec->priv_class)
         av_opt_free(avctx->priv_data);
     av_opt_free(avctx);
     av_freep(&avctx->priv_data);



More information about the ffmpeg-cvslog mailing list