summaryrefslogtreecommitdiff
path: root/libavcodec/aac_ac3_parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-19 04:09:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-19 04:14:21 +0100
commit32ab5b82f4b4391137659f8a727ee7955a5c79cf (patch)
tree901b0f5cdc4a5b652f71a4ff9eb10c43172f46c6 /libavcodec/aac_ac3_parser.c
parent8540368582fe44df3971eaff311dcc844b5d8609 (diff)
parent69d4dbfd1faa99563065329656bbe597d612ca03 (diff)
downloadffmpeg-32ab5b82f4b4391137659f8a727ee7955a5c79cf.tar.gz
Merge commit '69d4dbfd1faa99563065329656bbe597d612ca03'
* commit '69d4dbfd1faa99563065329656bbe597d612ca03': aac_ac3_parser: simplify an expression Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 6f1e188c20..2cf7392275 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;