mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-17 21:14:47 +00:00
lavfi/vf_mergeplanes: switch to query_func2()
This commit is contained in:
parent
989bc256a3
commit
dcd5a51e0a
@ -121,9 +121,11 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
static int query_formats(const AVFilterContext *ctx,
|
||||||
|
AVFilterFormatsConfig **cfg_in,
|
||||||
|
AVFilterFormatsConfig **cfg_out)
|
||||||
{
|
{
|
||||||
MergePlanesContext *s = ctx->priv;
|
const MergePlanesContext *s = ctx->priv;
|
||||||
AVFilterFormats *formats = NULL;
|
AVFilterFormats *formats = NULL;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
@ -137,12 +139,12 @@ static int query_formats(AVFilterContext *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < s->nb_inputs; i++)
|
for (i = 0; i < s->nb_inputs; i++)
|
||||||
if ((ret = ff_formats_ref(formats, &ctx->inputs[i]->outcfg.formats)) < 0)
|
if ((ret = ff_formats_ref(formats, &cfg_in[i]->formats)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
formats = NULL;
|
formats = NULL;
|
||||||
if ((ret = ff_add_format(&formats, s->out_fmt)) < 0 ||
|
if ((ret = ff_add_format(&formats, s->out_fmt)) < 0 ||
|
||||||
(ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
|
(ret = ff_formats_ref(formats, &cfg_out[0]->formats)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -318,6 +320,6 @@ const AVFilter ff_vf_mergeplanes = {
|
|||||||
.activate = activate,
|
.activate = activate,
|
||||||
.inputs = NULL,
|
.inputs = NULL,
|
||||||
FILTER_OUTPUTS(mergeplanes_outputs),
|
FILTER_OUTPUTS(mergeplanes_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_QUERY_FUNC2(query_formats),
|
||||||
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
|
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user