mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
decimate: check for avctx ptr before closing.
Fixes a crash init failed before setting avctx.
This commit is contained in:
parent
8cd7aab1bb
commit
29667a2c20
@ -148,8 +148,10 @@ static av_cold void uninit(AVFilterContext *ctx)
|
|||||||
{
|
{
|
||||||
DecimateContext *decimate = ctx->priv;
|
DecimateContext *decimate = ctx->priv;
|
||||||
av_frame_free(&decimate->ref);
|
av_frame_free(&decimate->ref);
|
||||||
avcodec_close(decimate->avctx);
|
if (decimate->avctx) {
|
||||||
av_freep(&decimate->avctx);
|
avcodec_close(decimate->avctx);
|
||||||
|
av_freep(&decimate->avctx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
static int query_formats(AVFilterContext *ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user