lavfi/deshake: fix crash in uninit()

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

Fix trac ticket #1472.
pull/59/head
Stefano Sabatini 13 years ago
parent f77fd34bc3
commit 1bb30d0295
  1. 3
      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);
}

Loading…
Cancel
Save