Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavfilter/vf_chromakey.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libavfilter/vf_chromakey.c b/libavfilter/vf_chromakey.c
index 532d81ecf6..d08e127445 100644
--- a/libavfilter/vf_chromakey.c
+++ b/libavfilter/vf_chromakey.c
@@ -301,9 +301,7 @@ static av_cold int config_output(AVFilterLink *outlink)
return 0;
}
-static av_cold int query_formats(AVFilterContext *avctx)
-{
- static const enum AVPixelFormat pixel_fmts[] = {
+static const enum AVPixelFormat chromakey_fmts[] = {
AV_PIX_FMT_YUVA420P,
AV_PIX_FMT_YUVA422P,
AV_PIX_FMT_YUVA444P,
@@ -332,12 +330,6 @@ static av_cold int query_formats(AVFilterContext *avctx)
AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
AV_PIX_FMT_NONE
};
- const enum AVPixelFormat *pix_fmts;
-
- pix_fmts = !strcmp(avctx->filter->name, "chromahold") ? hold_pixel_fmts : pixel_fmts;
-
- return ff_set_common_formats_from_list(avctx, pix_fmts);
-}
static av_cold int config_input(AVFilterLink *inlink)
{
@@ -401,7 +393,7 @@ const AVFilter ff_vf_chromakey = {
.priv_class = &chromakey_class,
FILTER_INPUTS(chromakey_inputs),
FILTER_OUTPUTS(chromakey_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_PIXFMTS_ARRAY(chromakey_fmts),
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
.process_command = process_command,
};
@@ -441,7 +433,7 @@ const AVFilter ff_vf_chromahold = {
.priv_class = &chromahold_class,
FILTER_INPUTS(chromahold_inputs),
FILTER_OUTPUTS(chromahold_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_PIXFMTS_ARRAY(hold_pixel_fmts),
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
.process_command = process_command,
};