]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_hflip.c
avfilter/vf_zscale: fix typo
[ffmpeg] / libavfilter / vf_hflip.c
index 362bd013a974db030d09c96fc794d6719533f48c..96ffca880b71c034a421c48246224799e5ccf534 100644 (file)
@@ -44,15 +44,16 @@ typedef struct FlipContext {
 static int query_formats(AVFilterContext *ctx)
 {
     AVFilterFormats *pix_fmts = 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_HWACCEL ||
               desc->flags & AV_PIX_FMT_FLAG_BITSTREAM ||
               (desc->log2_chroma_w != desc->log2_chroma_h &&
-               desc->comp[0].plane == desc->comp[1].plane)))
-            ff_add_format(&pix_fmts, fmt);
+               desc->comp[0].plane == desc->comp[1].plane)) &&
+            (ret = ff_add_format(&pix_fmts, fmt)) < 0)
+            return ret;
     }
 
     return ff_set_common_formats(ctx, pix_fmts);