diff options
author | Alex Converse <alex.converse@gmail.com> | 2012-02-02 18:59:15 -0800 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2012-02-09 13:33:07 -0800 |
commit | f1ecd0802d5e81f9f8fac482bc0cd5ceb6b7755a (patch) | |
tree | bc16bf83acec19dea269b51f2690d5ed4d3f49e4 /libavcodec/aacdec.c | |
parent | 37bed6ff3f7f48e25d1e0c3efdf8cbb90bcf9514 (diff) | |
download | ffmpeg-f1ecd0802d5e81f9f8fac482bc0cd5ceb6b7755a.tar.gz |
aacdec: Support native channel layout when requested.
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r-- | libavcodec/aacdec.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index bef17ab68d..b3bbc4b162 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -416,11 +416,13 @@ static av_cold int output_configure(AACContext *ac, } if (channel_config) { + if (avctx->request_channel_layout != AV_CH_LAYOUT_NATIVE) + sniff_channel_order(layout_map, tags); for (i = 0; i < tags_per_config[channel_config]; i++) { - int type = aac_channel_layout_map[channel_config - 1][i][0]; - int id = aac_channel_layout_map[channel_config - 1][i][1]; - int positon = aac_channel_layout_map[channel_config - 1][i][2]; - if ((ret = che_configure(ac, positon, + int type = layout_map[i][0]; + int id = layout_map[i][1]; + int position = layout_map[i][2]; + if ((ret = che_configure(ac, position, type, id, &channels))) return ret; @@ -437,7 +439,9 @@ static av_cold int output_configure(AACContext *ac, * channels in the order the PCE declared them. */ - uint64_t layout = sniff_channel_order(layout_map, tags); + uint64_t layout = 0; + if (avctx->request_channel_layout != AV_CH_LAYOUT_NATIVE) + layout = sniff_channel_order(layout_map, tags); for (i = 0; i < tags; i++) { int type = layout_map[i][0]; int id = layout_map[i][1]; |