summaryrefslogtreecommitdiff
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-30 05:33:25 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 17:37:09 +0200
commitaa6360928efee8c3193b1862bb520fc66cb3ef1f (patch)
tree4451a0bc6b84182cb23f05930646f22899d89e6a /libavfilter/formats.c
parent628b30e8866bfcc547e5ed873e3630d5705f7b8c (diff)
downloadffmpeg-aa6360928efee8c3193b1862bb520fc66cb3ef1f.tar.gz
avfilter/formats: Add function to create AVFilterFormats with one entry
Most instances ff_add_formats() actually only ever add one format; this function can be used to simplify those callers. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r--libavfilter/formats.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index ec3b8ebd8d..d667188381 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -431,6 +431,12 @@ int ff_add_channel_layout(AVFilterChannelLayouts **l, uint64_t channel_layout)
return 0;
}
+AVFilterFormats *ff_make_formats_list_singleton(int fmt)
+{
+ int fmts[2] = { fmt, -1 };
+ return ff_make_format_list(fmts);
+}
+
AVFilterFormats *ff_all_formats(enum AVMediaType type)
{
AVFilterFormats *ret = NULL;