Browse code

Fix various if parenthesis misplacements.

Clément Bœsch authored on 2011/11/21 15:50:03
Showing 6 changed files
... ...
@@ -173,7 +173,7 @@ int main(int argc, char **argv)
173 173
     av_register_all();
174 174
     avfilter_register_all();
175 175
 
176
-    if ((ret = open_input_file(argv[1]) < 0))
176
+    if ((ret = open_input_file(argv[1])) < 0)
177 177
         goto end;
178 178
     if ((ret = init_filters(filter_descr)) < 0)
179 179
         goto end;
... ...
@@ -1442,7 +1442,7 @@ static int decode_frame(AVCodecContext *avctx,
1442 1442
         ctx->cur_frame_length = sconf->frame_length;
1443 1443
 
1444 1444
     // decode the frame data
1445
-    if ((invalid_frame = read_frame_data(ctx, ra_frame) < 0))
1445
+    if ((invalid_frame = read_frame_data(ctx, ra_frame)) < 0)
1446 1446
         av_log(ctx->avctx, AV_LOG_WARNING,
1447 1447
                "Reading frame data failed. Skipping RA unit.\n");
1448 1448
 
... ...
@@ -634,11 +634,11 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
634 634
         res = AVERROR(EIO);
635 635
         goto out;
636 636
     }
637
-    if ((res = av_image_check_size(s->width, s->height, 0, s1) < 0))
637
+    if ((res = av_image_check_size(s->width, s->height, 0, s1)) < 0)
638 638
         goto out;
639 639
     s->frame_format = desired_format;
640 640
 
641
-    if ((res = v4l2_set_parameters(s1, ap) < 0))
641
+    if ((res = v4l2_set_parameters(s1, ap)) < 0)
642 642
         goto out;
643 643
 
644 644
     st->codec->pix_fmt = fmt_v4l2ff(desired_format, codec_id);
... ...
@@ -359,7 +359,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
359 359
     load_glyph(ctx, NULL, 0);
360 360
 
361 361
     /* set the tabsize in pixels */
362
-    if ((err = load_glyph(ctx, &glyph, ' ') < 0)) {
362
+    if ((err = load_glyph(ctx, &glyph, ' ')) < 0) {
363 363
         av_log(ctx, AV_LOG_ERROR, "Could not set tabsize.\n");
364 364
         return err;
365 365
     }
... ...
@@ -76,7 +76,7 @@ static int request_frame(AVFilterLink *outlink)
76 76
     int ret;
77 77
 
78 78
     if (!fifo->root.next) {
79
-        if ((ret = avfilter_request_frame(outlink->src->inputs[0]) < 0))
79
+        if ((ret = avfilter_request_frame(outlink->src->inputs[0])) < 0)
80 80
             return ret;
81 81
     }
82 82
 
... ...
@@ -442,7 +442,7 @@ static int wav_read_header(AVFormatContext *s,
442 442
         switch (tag) {
443 443
         case MKTAG('f', 'm', 't', ' '):
444 444
             /* only parse the first 'fmt ' tag found */
445
-            if (!got_fmt && (ret = wav_parse_fmt_tag(s, size, &st) < 0)) {
445
+            if (!got_fmt && (ret = wav_parse_fmt_tag(s, size, &st)) < 0) {
446 446
                 return ret;
447 447
             } else if (got_fmt)
448 448
                 av_log(s, AV_LOG_WARNING, "found more than one 'fmt ' tag\n");