summaryrefslogtreecommitdiff
path: root/libavfilter/vf_codecview.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 15:09:22 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:01:04 +0200
commitbe26348153b8e60df1e04f97bca5ee174cb0a744 (patch)
tree6e02b2b3319bfb1a2c96b6258230ad580da38df3 /libavfilter/vf_codecview.c
parent4317cea6ce3e8e6f7bf78930eda2ee40a067790a (diff)
avfilter/vf_codecview: Store format in filter, remove query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_codecview.c')
-rw-r--r--libavfilter/vf_codecview.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c
index ee4f03b436..aac038edef 100644
--- a/libavfilter/vf_codecview.c
+++ b/libavfilter/vf_codecview.c
@@ -81,14 +81,6 @@ static const AVOption codecview_options[] = {
AVFILTER_DEFINE_CLASS(codecview);
-static int query_formats(AVFilterContext *ctx)
-{
- // TODO: we can probably add way more pixel formats without any other
- // changes; anything with 8-bit luma in first plane should be working
- static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE};
- return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
-
static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx)
{
if(*sx > *ex)
@@ -354,7 +346,9 @@ const AVFilter ff_vf_codecview = {
.priv_size = sizeof(CodecViewContext),
FILTER_INPUTS(codecview_inputs),
FILTER_OUTPUTS(codecview_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ // TODO: we can probably add way more pixel formats without any other
+ // changes; anything with 8-bit luma in first plane should be working
+ FILTER_SINGLE_PIXFMT(AV_PIX_FMT_YUV420P),
.priv_class = &codecview_class,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
};