diff options
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r-- | libavfilter/formats.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c index eccb52304b..b6e30e7ab4 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -22,6 +22,7 @@ #include "libavutil/pixdesc.h" #include "libavutil/audioconvert.h" #include "avfilter.h" +#include "internal.h" /** * Add all refs from a to ret and destroy a. @@ -73,6 +74,17 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b) return ret; } +int ff_fmt_is_in(int fmt, const int *fmts) +{ + const int *p; + + for (p = fmts; *p != -1; p++) { + if (fmt == *p) + return 1; + } + return 0; +} + #define MAKE_FORMAT_LIST() \ AVFilterFormats *formats; \ int count = 0; \ |