Browse Source

aac_ac3_parser: simplify an expression

Signed-off-by: Diego Biurrun <diego@biurrun.de>
tags/n2.2-rc1
Tim Walker Diego Biurrun 12 years ago
parent
commit
69d4dbfd1f
1 changed files with 3 additions and 7 deletions
  1. +3
    -7
      libavcodec/aac_ac3_parser.c

+ 3
- 7
libavcodec/aac_ac3_parser.c View File

@@ -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;


Loading…
Cancel
Save