]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/formats.c
avfilter/formats: Remove avfilter_make_format64_list()
[ffmpeg] / libavfilter / formats.c
index 95361170c5fa0dcef1326e75390b71b904876aeb..6c05b118c9c5b4cc20229c3330d072f6e3b4a1f2 100644 (file)
@@ -304,13 +304,6 @@ AVFilterChannelLayouts *ff_make_format64_list(const int64_t *fmts)
     return formats;
 }
 
-#if LIBAVFILTER_VERSION_MAJOR < 8
-AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts)
-{
-    return ff_make_format64_list(fmts);
-}
-#endif
-
 #define ADD_FORMAT(f, fmt, unref_fn, type, list, nb)        \
 do {                                                        \
     type *fmts;                                             \
@@ -446,7 +439,7 @@ AVFilterChannelLayouts *ff_all_channel_counts(void)
 #define FORMATS_REF(f, ref, unref_fn)                                           \
     void *tmp;                                                                  \
                                                                                 \
-    if (!f || !ref)                                                             \
+    if (!f)                                                                     \
         return AVERROR(ENOMEM);                                                 \
                                                                                 \
     tmp = av_realloc_array(f->refs, sizeof(*f->refs), f->refcount + 1);         \
@@ -483,7 +476,7 @@ do {                                        \
 do {                                                               \
     int idx = -1;                                                  \
                                                                    \
-    if (!ref || !*ref)                                             \
+    if (!*ref)                                                     \
         return;                                                    \
                                                                    \
     FIND_REF_INDEX(ref, idx);                                      \
@@ -594,8 +587,8 @@ int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
 int ff_default_query_formats(AVFilterContext *ctx)
 {
     int ret;
-    enum AVMediaType type = ctx->inputs  && ctx->inputs [0] ? ctx->inputs [0]->type :
-                            ctx->outputs && ctx->outputs[0] ? ctx->outputs[0]->type :
+    enum AVMediaType type = ctx->nb_inputs  ? ctx->inputs [0]->type :
+                            ctx->nb_outputs ? ctx->outputs[0]->type :
                             AVMEDIA_TYPE_VIDEO;
 
     ret = ff_set_common_formats(ctx, ff_all_formats(type));