diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-30 05:33:25 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-05 17:37:09 +0200 |
commit | aa6360928efee8c3193b1862bb520fc66cb3ef1f (patch) | |
tree | 4451a0bc6b84182cb23f05930646f22899d89e6a /libavfilter/formats.h | |
parent | 628b30e8866bfcc547e5ed873e3630d5705f7b8c (diff) | |
download | ffmpeg-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.h | 6 |
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. |