Commit 69d4dbfd authored by Tim Walker's avatar Tim Walker Committed by Diego Biurrun

aac_ac3_parser: simplify an expression

Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
parent 37a3cac7
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment