mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
lavfi/vf_showpalette: convert to query_func2()
This commit is contained in:
parent
a96244df77
commit
965e9b646e
@ -41,17 +41,19 @@ static const AVOption showpalette_options[] = {
|
||||
|
||||
AVFILTER_DEFINE_CLASS(showpalette);
|
||||
|
||||
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_PAL8, AV_PIX_FMT_NONE};
|
||||
static const enum AVPixelFormat out_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE};
|
||||
int ret = ff_formats_ref(ff_make_format_list(in_fmts),
|
||||
&ctx->inputs[0]->outcfg.formats);
|
||||
&cfg_in[0]->formats);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return ff_formats_ref(ff_make_format_list(out_fmts),
|
||||
&ctx->outputs[0]->incfg.formats);
|
||||
&cfg_out[0]->formats);
|
||||
}
|
||||
|
||||
static int config_output(AVFilterLink *outlink)
|
||||
@ -116,6 +118,6 @@ const AVFilter ff_vf_showpalette = {
|
||||
.priv_size = sizeof(ShowPaletteContext),
|
||||
FILTER_INPUTS(showpalette_inputs),
|
||||
FILTER_OUTPUTS(showpalette_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_QUERY_FUNC2(query_formats),
|
||||
.priv_class = &showpalette_class,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user