[SCM] libav/experimental: Add a NULL pointer check to avcodec_close() this should prevent a segfault when closing without open.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:54:17 UTC 2013
The following commit has been merged in the experimental branch:
commit dccda293a0576d5414fafc0e95615c82a2f2399f
Author: Michael Niedermayer <michaelni at gmx.at>
Date: Tue Nov 10 02:51:47 2009 +0000
Add a NULL pointer check to avcodec_close() this should prevent a segfault
when closing without open.
Originally committed as revision 20495 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 2f18848..ddd1160 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -675,7 +675,7 @@ int avcodec_close(AVCodecContext *avctx)
if (HAVE_THREADS && avctx->thread_opaque)
avcodec_thread_free(avctx);
- if (avctx->codec->close)
+ if (avctx->codec && avctx->codec->close)
avctx->codec->close(avctx);
avcodec_default_free_buffers(avctx);
av_freep(&avctx->priv_data);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list