[FFmpeg-cvslog] r22811 - trunk/libavcodec/utils.c
benoit
subversion
Tue Apr 6 11:52:41 CEST 2010
Author: benoit
Date: Tue Apr 6 11:52:41 2010
New Revision: 22811
Log:
Fix segfault when encoder initialization fails.
Patch by Craig Thomasson $(name) dot $(surname) ripcode com
Modified:
trunk/libavcodec/utils.c
Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c Mon Apr 5 21:55:12 2010 (r22810)
+++ trunk/libavcodec/utils.c Tue Apr 6 11:52:41 2010 (r22811)
@@ -710,7 +710,7 @@ av_cold int avcodec_close(AVCodecContext
avctx->codec->close(avctx);
avcodec_default_free_buffers(avctx);
av_freep(&avctx->priv_data);
- if(avctx->codec->encode)
+ if(avctx->codec && avctx->codec->encode)
av_freep(&avctx->extradata);
avctx->codec = NULL;
entangled_thread_counter--;
More information about the ffmpeg-cvslog
mailing list