mirror of https://git.ffmpeg.org/ffmpeg.git
lavfi/vf_palettegen: switch to query_func2()
This commit is contained in:
parent
c8344737b6
commit
18e43c2d39
|
@ -100,15 +100,17 @@ static const AVOption palettegen_options[] = {
|
||||||
|
|
||||||
AVFILTER_DEFINE_CLASS(palettegen);
|
AVFILTER_DEFINE_CLASS(palettegen);
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
static int query_formats(const AVFilterContext *ctx,
|
||||||
|
AVFilterFormatsConfig **cfg_in,
|
||||||
|
AVFilterFormatsConfig **cfg_out)
|
||||||
{
|
{
|
||||||
static const enum AVPixelFormat in_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE};
|
static const enum AVPixelFormat in_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE};
|
||||||
static const enum AVPixelFormat out_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE};
|
static const enum AVPixelFormat out_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE};
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if ((ret = ff_formats_ref(ff_make_format_list(in_fmts) , &ctx->inputs[0]->outcfg.formats)) < 0)
|
if ((ret = ff_formats_ref(ff_make_format_list(in_fmts) , &cfg_in[0]->formats)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if ((ret = ff_formats_ref(ff_make_format_list(out_fmts), &ctx->outputs[0]->incfg.formats)) < 0)
|
if ((ret = ff_formats_ref(ff_make_format_list(out_fmts), &cfg_out[0]->formats)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -579,6 +581,6 @@ const AVFilter ff_vf_palettegen = {
|
||||||
.uninit = uninit,
|
.uninit = uninit,
|
||||||
FILTER_INPUTS(palettegen_inputs),
|
FILTER_INPUTS(palettegen_inputs),
|
||||||
FILTER_OUTPUTS(palettegen_outputs),
|
FILTER_OUTPUTS(palettegen_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_QUERY_FUNC2(query_formats),
|
||||||
.priv_class = &palettegen_class,
|
.priv_class = &palettegen_class,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue