diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-06-21 17:00:52 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-06-21 17:01:44 +0200 |
commit | 1bb30d02959e530c72a0026047cb916883c031a7 (patch) | |
tree | 83081b580ee9f228f06cb4f12932800b83197d4b /libavfilter | |
parent | f77fd34bc34c93a555eee99226d01d947d02a2a3 (diff) | |
download | ffmpeg-1bb30d02959e530c72a0026047cb916883c031a7.tar.gz |
lavfi/deshake: fix crash in uninit()
Add NULL check on avctx before calling avcodec_close() on it.
Fix trac ticket #1472.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_deshake.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index 6b2a3d4c7d..ff78f1f883 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); } |