[FFmpeg-devel] [PATCH] lavc/audiotoolbox: fix mappings for surround-direct and surround-center channels
Rodger Combs
rodger.combs at gmail.com
Fri Jun 10 06:07:15 CEST 2016
---
libavcodec/audiotoolboxdec.c | 2 +-
libavcodec/audiotoolboxenc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
index 2748e8d..3f12a46 100644
--- a/libavcodec/audiotoolboxdec.c
+++ b/libavcodec/audiotoolboxdec.c
@@ -102,7 +102,7 @@ static int ffat_get_channel_id(AudioChannelLabel label)
else if (label <= kAudioChannelLabel_RightSurround)
return label + 4;
else if (label <= kAudioChannelLabel_CenterSurround)
- return label + 1;
+ return label - 1;
else if (label <= kAudioChannelLabel_RightSurroundDirect)
return label + 23;
else if (label <= kAudioChannelLabel_TopBackRight)
diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
index 855df0c..e93c879 100644
--- a/libavcodec/audiotoolboxenc.c
+++ b/libavcodec/audiotoolboxenc.c
@@ -154,7 +154,7 @@ static av_cold int get_channel_label(int channel)
else if (map <= AV_CH_BACK_RIGHT)
return channel + 29;
else if (map <= AV_CH_BACK_CENTER)
- return channel - 1;
+ return channel + 1;
else if (map <= AV_CH_SIDE_RIGHT)
return channel - 4;
else if (map <= AV_CH_TOP_BACK_RIGHT)
--
2.8.3
More information about the ffmpeg-devel
mailing list