summaryrefslogtreecommitdiff
path: root/libavfilter/formats.h
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.h
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.h')
-rw-r--r--libavfilter/formats.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/formats.h b/libavfilter/formats.h
index 42fe068765..a884d15213 100644
--- a/libavfilter/formats.h
+++ b/libavfilter/formats.h
@@ -209,6 +209,12 @@ av_warn_unused_result
AVFilterFormats *ff_make_format_list(const int *fmts);
/**
+ * Equivalent to ff_make_format_list({const int[]}{ fmt, -1 })
+ */
+av_warn_unused_result
+AVFilterFormats *ff_make_formats_list_singleton(int fmt);
+
+/**
* Add fmt to the list of media formats contained in *avff.
* If *avff is NULL the function allocates the filter formats struct
* and puts its pointer in *avff.