aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dca.c
diff options
context:
space:
mode:
authorAlexandre Colucci <alexandre@elgato.com>2011-05-13 00:21:19 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-05-13 00:21:19 +0200
commita37f7b62461e43f90b30d231e97fb105ae5028fe (patch)
tree7b3ef30e1209310a7028cd5fbaaeb39ec23acbac /libavcodec/dca.c
parentf0eb373f9dcd3a98177e5637755b3332bd77b1a8 (diff)
downloadffmpeg-a37f7b62461e43f90b30d231e97fb105ae5028fe.tar.gz
Support native DTS channel order when requested.
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r--libavcodec/dca.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 03bf7f7b26..7a35631eea 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -1793,6 +1793,10 @@ static int dca_decode_frame(AVCodecContext * avctx,
s->output = DCA_STEREO;
avctx->channel_layout = AV_CH_LAYOUT_STEREO;
}
+ else if (avctx->request_channel_layout & AV_CH_LAYOUT_NATIVE) {
+ static const int8_t dca_channel_order_native[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
+ s->channel_order_tab = dca_channel_order_native;
+ }
} else {
av_log(avctx, AV_LOG_ERROR, "Non standard configuration %d !\n",s->amode);
return -1;