]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_swapuv.c
aacdec: fix strict prototype warning
[ffmpeg] / libavfilter / vf_swapuv.c
index 624e6b624f2c693c345d0259d5b20cc2b5f4d998..1a82ef3cc9b53eb9f6fe074ee99ed9042f4f8f7c 100644 (file)
@@ -77,12 +77,12 @@ static int is_planar_yuv(const AVPixFmtDescriptor *desc)
 static int query_formats(AVFilterContext *ctx)
 {
     AVFilterFormats *formats = NULL;
-    int fmt;
+    int fmt, ret;
 
     for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) {
         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
-        if (is_planar_yuv(desc))
-            ff_add_format(&formats, fmt);
+        if (is_planar_yuv(desc) && (ret = ff_add_format(&formats, fmt)) < 0)
+            return ret;
     }
 
     return ff_set_common_formats(ctx, formats);