]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_noise.c
Merge commit '567ca142952c5be57e52c149c815dfe5d6ac6d41'
[ffmpeg] / libavfilter / vf_noise.c
index c658bba8c1781d74941fcb94880a9a7d584a2d29..dbdae7d90f86fb7626fe36b400ab7ccd0d802d8a 100644 (file)
@@ -133,12 +133,13 @@ static av_cold int init_noise(NoiseContext *n, int comp)
 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 (desc->flags & AV_PIX_FMT_FLAG_PLANAR && !(desc->comp[0].depth & 7))
-            ff_add_format(&formats, fmt);
+        if (desc->flags & AV_PIX_FMT_FLAG_PLANAR && !(desc->comp[0].depth & 7)
+            && (ret = ff_add_format(&formats, fmt)) < 0)
+                return ret;
     }
 
     return ff_set_common_formats(ctx, formats);