Skip to content
This repository
Browse code

ActiveAE: fix remap for channels greater 8

  • Loading branch information...
commit 2c88347cb8195af697e67994b8a7b3a2de450d5f 1 parent 2a7d35e
Rainer Hochecker authored September 13, 2013
3  xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp
@@ -93,8 +93,10 @@ bool CActiveAEResample::Init(uint64_t dst_chan_layout, int dst_channels, int dst
93 93
     // remapLayout is the layout of the sink, if the channel is in our src layout
94 94
     // the channel is mapped by setting coef 1.0
95 95
     memset(m_rematrix, 0, sizeof(m_rematrix));
  96
+    m_dst_chan_layout = 0;
96 97
     for (unsigned int out=0; out<remapLayout->Count(); out++)
97 98
     {
  99
+      m_dst_chan_layout += (1 << out);
98 100
       int idx = GetAVChannelIndex((*remapLayout)[out], m_src_chan_layout);
99 101
       if (idx >= 0)
100 102
       {
@@ -102,7 +104,6 @@ bool CActiveAEResample::Init(uint64_t dst_chan_layout, int dst_channels, int dst
102 104
       }
103 105
     }
104 106
 
105  
-    m_dst_chan_layout = m_dllAvUtil.av_get_default_channel_layout(m_dst_channels);
106 107
     m_dllAvUtil.av_opt_set_int(m_pContext, "out_channel_count", m_dst_channels, 0);
107 108
     m_dllAvUtil.av_opt_set_int(m_pContext, "out_channel_layout", m_dst_chan_layout, 0);
108 109
 

0 notes on commit 2c88347

Please sign in to comment.
Something went wrong with that request. Please try again.