Commit 1bb30d02 authored by Stefano Sabatini's avatar Stefano Sabatini

lavfi/deshake: fix crash in uninit()

Add NULL check on avctx before calling avcodec_close() on it.

Fix trac ticket #1472.
parent f77fd34b
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment