summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.c
diff options
context:
space:
mode:
authorTim Walker <tdskywalker@gmail.com>2013-11-18 12:41:47 +0100
committerDiego Biurrun <diego@biurrun.de>2013-11-19 18:52:17 +0100
commitffb0af7f17eb0da86e9b140e86a1404d3c6c9e79 (patch)
tree3ca9b446f69b269927ea9e65085ae59164fde907 /libavcodec/ac3dec.c
parent57f13fd7e993ee0b582695c7af7a6bdf1c7d0761 (diff)
ac3dec: simplify an expression
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r--libavcodec/ac3dec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 3edb3aff83..641920860e 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -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;