X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_palettegen.c;h=323fa53688d3b8ccb0e5de3e14e502fc877eb390;hb=69c32456a045235c67243515384666c741b7e8e6;hp=1aa5e19e04d58ab7823e4bc6a5757b61608a02bf;hpb=877c038a9db5e2b7c43b267ce807d81fe3637f7a;p=ffmpeg diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 1aa5e19e04d..323fa53688d 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -52,7 +52,7 @@ enum { NB_STATS_MODE }; -#define NBITS 4 +#define NBITS 5 #define HIST_SIZE (1<<(3*NBITS)) typedef struct { @@ -90,8 +90,11 @@ static int query_formats(AVFilterContext *ctx) static const enum AVPixelFormat out_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE}; AVFilterFormats *in = ff_make_format_list(in_fmts); AVFilterFormats *out = ff_make_format_list(out_fmts); - if (!in || !out) + if (!in || !out) { + av_freep(&in); + av_freep(&out); return AVERROR(ENOMEM); + } ff_formats_ref(in, &ctx->inputs[0]->out_formats); ff_formats_ref(out, &ctx->outputs[0]->in_formats); return 0;