decimate: check for avctx ptr before closing.

Fixes a crash init failed before setting avctx.
pull/13/merge
Clément Bœsch 12 years ago
parent 8cd7aab1bb
commit 29667a2c20
  1. 2
      libavfilter/vf_decimate.c

@ -148,9 +148,11 @@ static av_cold void uninit(AVFilterContext *ctx)
{
DecimateContext *decimate = ctx->priv;
av_frame_free(&decimate->ref);
if (decimate->avctx) {
avcodec_close(decimate->avctx);
av_freep(&decimate->avctx);
}
}
static int query_formats(AVFilterContext *ctx)
{

Loading…
Cancel
Save