mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavfi/vf_remap: switch to query_func2()
This commit is contained in:
parent
dcd5a51e0a
commit
4d69398dda
@ -82,9 +82,11 @@ typedef struct ThreadData {
|
|||||||
int step;
|
int step;
|
||||||
} ThreadData;
|
} ThreadData;
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
static int query_formats(const AVFilterContext *ctx,
|
||||||
|
AVFilterFormatsConfig **cfg_in,
|
||||||
|
AVFilterFormatsConfig **cfg_out)
|
||||||
{
|
{
|
||||||
RemapContext *s = ctx->priv;
|
const RemapContext *s = ctx->priv;
|
||||||
static const enum AVPixelFormat pix_fmts[] = {
|
static const enum AVPixelFormat pix_fmts[] = {
|
||||||
AV_PIX_FMT_YUVA444P,
|
AV_PIX_FMT_YUVA444P,
|
||||||
AV_PIX_FMT_YUV444P,
|
AV_PIX_FMT_YUV444P,
|
||||||
@ -116,14 +118,14 @@ static int query_formats(AVFilterContext *ctx)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
pix_formats = ff_make_format_list(s->format ? gray_pix_fmts : pix_fmts);
|
pix_formats = ff_make_format_list(s->format ? gray_pix_fmts : pix_fmts);
|
||||||
if ((ret = ff_formats_ref(pix_formats, &ctx->inputs[0]->outcfg.formats)) < 0 ||
|
if ((ret = ff_formats_ref(pix_formats, &cfg_in[0]->formats)) < 0 ||
|
||||||
(ret = ff_formats_ref(pix_formats, &ctx->outputs[0]->incfg.formats)) < 0)
|
(ret = ff_formats_ref(pix_formats, &cfg_out[0]->formats)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
map_formats = ff_make_format_list(map_fmts);
|
map_formats = ff_make_format_list(map_fmts);
|
||||||
if ((ret = ff_formats_ref(map_formats, &ctx->inputs[1]->outcfg.formats)) < 0)
|
if ((ret = ff_formats_ref(map_formats, &cfg_in[1]->formats)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
return ff_formats_ref(map_formats, &ctx->inputs[2]->outcfg.formats);
|
return ff_formats_ref(map_formats, &cfg_in[2]->formats);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -403,7 +405,7 @@ const AVFilter ff_vf_remap = {
|
|||||||
.activate = activate,
|
.activate = activate,
|
||||||
FILTER_INPUTS(remap_inputs),
|
FILTER_INPUTS(remap_inputs),
|
||||||
FILTER_OUTPUTS(remap_outputs),
|
FILTER_OUTPUTS(remap_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_QUERY_FUNC2(query_formats),
|
||||||
.priv_class = &remap_class,
|
.priv_class = &remap_class,
|
||||||
.flags = AVFILTER_FLAG_SLICE_THREADS,
|
.flags = AVFILTER_FLAG_SLICE_THREADS,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user