diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-04-19 15:05:32 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-04-19 15:05:32 +0000 |
commit | bfeca7beb63bc297c8c59469a53e469d11ec4d23 (patch) | |
tree | 407aa9c0f23f3b28a08a5c77e5290c86e698bb21 /libavcodec/ac3dec.c | |
parent | be233a569165ad39a63ff2137763a123cd4f2562 (diff) | |
download | ffmpeg-bfeca7beb63bc297c8c59469a53e469d11ec4d23.tar.gz |
Add channel layout support to the AC-3 decoder and AC-3 parser.
Originally committed as revision 18622 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r-- | libavcodec/ac3dec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 4a177aae69..c142ca9bb2 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -285,6 +285,7 @@ static int parse_frame_header(AC3DecodeContext *s) /* get decoding parameters from header info */ s->bit_alloc_params.sr_code = hdr.sr_code; s->channel_mode = hdr.channel_mode; + s->channel_layout = hdr.channel_layout; s->lfe_on = hdr.lfe_on; s->bit_alloc_params.sr_shift = hdr.sr_shift; s->sample_rate = hdr.sample_rate; @@ -1307,8 +1308,10 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, avctx->request_channels < s->channels) { s->out_channels = avctx->request_channels; s->output_mode = avctx->request_channels == 1 ? AC3_CHMODE_MONO : AC3_CHMODE_STEREO; + s->channel_layout = ff_ac3_channel_layout_tab[s->output_mode]; } avctx->channels = s->out_channels; + avctx->channel_layout = s->channel_layout; /* set downmixing coefficients if needed */ if(s->channels != s->out_channels && !((s->output_mode & AC3_OUTPUT_LFEON) && |