1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

decimate: check for avctx ptr before closing.

Fixes a crash init failed before setting avctx.
This commit is contained in:
Clément Bœsch 2013-03-31 10:00:32 +02:00
parent 8cd7aab1bb
commit 29667a2c20

View File

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