aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-23 13:32:18 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-23 13:36:15 +0100
commit2cbf27b08a4991de608b305a8600b59467587605 (patch)
treeb4280aaaece9ef4737ffb83e2801a72fb03e72cb
parent2e5780a53f43711015965e4dd4a9cf7ad0f3f27b (diff)
downloadffmpeg-2cbf27b08a4991de608b305a8600b59467587605.tar.gz
libavcodec/ac3dec: fix channel_layout
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/ac3dec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index d1c3523ff7..fd85806bda 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1369,7 +1369,9 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
s->output_mode = AC3_CHMODE_STEREO;
}
avctx->channels = s->out_channels;
- avctx->channel_layout = avpriv_ac3_channel_layout_tab[s->output_mode];
+ avctx->channel_layout = avpriv_ac3_channel_layout_tab[s->output_mode & ~AC3_OUTPUT_LFEON];
+ if (s->output_mode & AC3_OUTPUT_LFEON)
+ avctx->channel_layout |= AV_CH_LOW_FREQUENCY;
s->loro_center_mix_level = gain_levels[s-> center_mix_level];
s->loro_surround_mix_level = gain_levels[s->surround_mix_level];