avfilter/vf_histogram: Fix order of operations with flags
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 3 Sep 2015 21:02:03 +0000 (23:02 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 3 Sep 2015 21:02:03 +0000 (23:02 +0200)
Fixes CID1322325

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/vf_histogram.c

index e9df420..443cbda 100644 (file)
@@ -180,7 +180,7 @@ static int query_formats(AVFilterContext *ctx)
         bits = desc->comp[0].depth_minus1;
         for (i = 1; i < avff->nb_formats; i++) {
             desc = av_pix_fmt_desc_get(avff->formats[i]);
-            if ((rgb != desc->flags & AV_PIX_FMT_FLAG_RGB) ||
+            if ((rgb != (desc->flags & AV_PIX_FMT_FLAG_RGB)) ||
                 (bits != desc->comp[0].depth_minus1))
                 return AVERROR(EAGAIN);
         }