summaryrefslogtreecommitdiff
path: root/libavcodec/aac_ac3_parser.c
diff options
context:
space:
mode:
authorTim Walker <tdskywalker@gmail.com>2013-11-18 12:41:46 +0100
committerDiego Biurrun <diego@biurrun.de>2013-11-19 02:02:53 +0100
commit69d4dbfd1faa99563065329656bbe597d612ca03 (patch)
treed9bd080dacf2077f47af87a5c367a270e6555ab4 /libavcodec/aac_ac3_parser.c
parent37a3cac78c6b13dc4e2c4f33ef53eed722d6f7b9 (diff)
aac_ac3_parser: simplify an expression
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/aac_ac3_parser.c')
-rw-r--r--libavcodec/aac_ac3_parser.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index b17cd4d52f..00d95ad155 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -82,13 +82,9 @@ get_next:
if (avctx->codec_id != AV_CODEC_ID_AAC) {
avctx->sample_rate = s->sample_rate;
- /* allow downmixing to stereo (or mono for AC-3) */
- if(avctx->request_channels > 0 &&
- avctx->request_channels < s->channels &&
- (avctx->request_channels <= 2 ||
- (avctx->request_channels == 1 &&
- (avctx->codec_id == AV_CODEC_ID_AC3 ||
- avctx->codec_id == AV_CODEC_ID_EAC3)))) {
+ /* (E-)AC-3: allow downmixing to stereo or mono */
+ if (avctx->request_channels > 0 && avctx->request_channels <= 2 &&
+ avctx->request_channels < s->channels) {
avctx->channels = avctx->request_channels;
} else {
avctx->channels = s->channels;