ac3dec: simplify an expression
authorTim Walker <tdskywalker@gmail.com>
Mon, 18 Nov 2013 11:41:47 +0000 (12:41 +0100)
committerDiego Biurrun <diego@biurrun.de>
Tue, 19 Nov 2013 17:52:17 +0000 (18:52 +0100)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
libavcodec/ac3dec.c

index 3edb3af..6419208 100644 (file)
@@ -178,9 +178,8 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
     avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
 
     /* allow downmixing to stereo or mono */
-    if (avctx->channels > 0 && avctx->request_channels > 0 &&
-            avctx->request_channels < avctx->channels &&
-            avctx->request_channels <= 2) {
+    if (avctx->request_channels > 0 && avctx->request_channels <= 2 &&
+        avctx->request_channels < avctx->channels) {
         avctx->channels = avctx->request_channels;
     }
     s->downmixed = 1;