[FFmpeg-cvslog] lavfi/deshake: fix crash in uninit()
Stefano Sabatini
git at videolan.org
Thu Jun 21 17:03:32 CEST 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Thu Jun 21 17:00:52 2012 +0200| [1bb30d02959e530c72a0026047cb916883c031a7] | committer: Stefano Sabatini
lavfi/deshake: fix crash in uninit()
Add NULL check on avctx before calling avcodec_close() on it.
Fix trac ticket #1472.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1bb30d02959e530c72a0026047cb916883c031a7
---
libavfilter/vf_deshake.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index 6b2a3d4..ff78f1f 100644
--- a/libavfilter/vf_deshake.c
+++ b/libavfilter/vf_deshake.c
@@ -420,7 +420,8 @@ static av_cold void uninit(AVFilterContext *ctx)
avfilter_unref_buffer(deshake->ref);
if (deshake->fp)
fclose(deshake->fp);
- avcodec_close(deshake->avctx);
+ if (deshake->avctx)
+ avcodec_close(deshake->avctx);
av_freep(&deshake->avctx);
}
More information about the ffmpeg-cvslog
mailing list