You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfilter/vf_colorkey: Use formats list instead of query func
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -159,8 +159,6 @@ static av_cold int config_output(AVFilterLink *outlink)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_cold int query_formats(AVFilterContext *avctx)
|
|
||||||
{
|
|
||||||
static const enum AVPixelFormat pixel_fmts[] = {
|
static const enum AVPixelFormat pixel_fmts[] = {
|
||||||
AV_PIX_FMT_ARGB,
|
AV_PIX_FMT_ARGB,
|
||||||
AV_PIX_FMT_RGBA,
|
AV_PIX_FMT_RGBA,
|
||||||
@@ -169,9 +167,6 @@ static av_cold int query_formats(AVFilterContext *avctx)
|
|||||||
AV_PIX_FMT_NONE
|
AV_PIX_FMT_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
return ff_set_common_formats_from_list(avctx, pixel_fmts);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const AVFilterPad colorkey_inputs[] = {
|
static const AVFilterPad colorkey_inputs[] = {
|
||||||
{
|
{
|
||||||
.name = "default",
|
.name = "default",
|
||||||
@@ -211,7 +206,7 @@ const AVFilter ff_vf_colorkey = {
|
|||||||
.init = init_filter,
|
.init = init_filter,
|
||||||
FILTER_INPUTS(colorkey_inputs),
|
FILTER_INPUTS(colorkey_inputs),
|
||||||
FILTER_OUTPUTS(colorkey_outputs),
|
FILTER_OUTPUTS(colorkey_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_PIXFMTS_ARRAY(pixel_fmts),
|
||||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||||
.process_command = ff_filter_process_command,
|
.process_command = ff_filter_process_command,
|
||||||
};
|
};
|
||||||
@@ -236,7 +231,7 @@ const AVFilter ff_vf_colorhold = {
|
|||||||
.init = init_filter,
|
.init = init_filter,
|
||||||
FILTER_INPUTS(colorkey_inputs),
|
FILTER_INPUTS(colorkey_inputs),
|
||||||
FILTER_OUTPUTS(colorkey_outputs),
|
FILTER_OUTPUTS(colorkey_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_PIXFMTS_ARRAY(pixel_fmts),
|
||||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||||
.process_command = ff_filter_process_command,
|
.process_command = ff_filter_process_command,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user