aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jcmarsha@gmail.com>2014-03-23 11:08:24 +1300
committerTrent Nelson <trent.a.b.nelson@gmail.com>2014-03-24 11:01:09 -0600
commit88679b4b75052baaabd1fbbc3186ade1b0998344 (patch)
treef5fdc7518635f0ef774cc2a2d51e4b011c048be0
parent878d89e430cc9688ca172ae3d0f542d48cd458a4 (diff)
Merge pull request #4442 from FernetMenta/channels
AE: fix CAEChannelInfo::ResolveChannels, it returned duplicate channels ...
-rw-r--r--xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp b/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
index a051cf5f88..05a263ef97 100644
--- a/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
+++ b/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
@@ -102,13 +102,13 @@ void CAEChannelInfo::ResolveChannels(const CAEChannelInfo& rhs)
}
/* we need to ensure we end up with rear or side channels for downmix to work */
- if (srcHasSL && !dstHasSL && dstHasRL)
+ if (srcHasSL && !dstHasSL && dstHasRL && !newInfo.HasChannel(AE_CH_BL))
newInfo += AE_CH_BL;
- if (srcHasSR && !dstHasSR && dstHasRR)
+ if (srcHasSR && !dstHasSR && dstHasRR && !newInfo.HasChannel(AE_CH_BR))
newInfo += AE_CH_BR;
- if (srcHasRL && !dstHasRL && dstHasSL)
+ if (srcHasRL && !dstHasRL && dstHasSL && !newInfo.HasChannel(AE_CH_SL))
newInfo += AE_CH_SL;
- if (srcHasRR && !dstHasRR && dstHasSR)
+ if (srcHasRR && !dstHasRR && dstHasSR && !newInfo.HasChannel(AE_CH_SR))
newInfo += AE_CH_SR;
// mix back center if not available in destination layout