summaryrefslogtreecommitdiff
path: root/libavfilter/vf_blackframe.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 15:08:18 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:01:04 +0200
commit4317cea6ce3e8e6f7bf78930eda2ee40a067790a (patch)
tree7e3554fcdaaa231a6898f00960f652d1b8c639dc /libavfilter/vf_blackframe.c
parentbd17c4359e329913bc4e198401ae3ddcbba59b60 (diff)
downloadffmpeg-4317cea6ce3e8e6f7bf78930eda2ee40a067790a.tar.gz
avfilter/vf_blackframe: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_blackframe.c')
-rw-r--r--libavfilter/vf_blackframe.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c
index 29bed4af68..05641c2fea 100644
--- a/libavfilter/vf_blackframe.c
+++ b/libavfilter/vf_blackframe.c
@@ -46,17 +46,12 @@ typedef struct BlackFrameContext {
unsigned int last_keyframe; ///< frame number of the last received key-frame
} BlackFrameContext;
-static int query_formats(AVFilterContext *ctx)
-{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NV12,
AV_PIX_FMT_NV21, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P,
AV_PIX_FMT_NONE
};
- return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
-
#define SET_META(key, format, value) \
snprintf(buf, sizeof(buf), format, value); \
av_dict_set(metadata, key, buf, 0)
@@ -134,5 +129,5 @@ const AVFilter ff_vf_blackframe = {
.priv_class = &blackframe_class,
FILTER_INPUTS(avfilter_vf_blackframe_inputs),
FILTER_OUTPUTS(avfilter_vf_blackframe_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_PIXFMTS_ARRAY(pix_fmts),
};