Skip to content
This repository
Browse code

AE: fix stream info for EAC3

  • Loading branch information...
commit 7a181693716d573484313f6caf1e0a323bd41c22 1 parent 2ac8e6c
Rainer Hochecker authored August 28, 2013
11  xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp
@@ -392,18 +392,17 @@ unsigned int CAEStreamInfo::SyncAC3(uint8_t *data, unsigned int size)
392 392
       m_fsize        = framesize << 1;
393 393
       m_repeat       = MAX_EAC3_BLOCKS / blocks;
394 394
 
395  
-      if (m_sampleRate == 48000 || m_sampleRate == 96000 || m_sampleRate == 192000)
396  
-        m_outputRate = 192000;
397  
-      else
398  
-        m_outputRate = 176400;
  395
+      // sampling rate multiplied with number of channels must equal the value
  396
+      // given by the pack function
  397
+      m_outputRate = 192000;
399 398
 
400 399
       if (m_dataType == STREAM_TYPE_EAC3 && m_hasSync && skip == 0)
401 400
         return 0;
402 401
 
403 402
       /* if we get here, we can sync */
404 403
       m_hasSync        = true;
405  
-      m_outputChannels = 8;
406  
-      m_channelMap     = CAEChannelInfo(OutputMaps[1]);
  404
+      m_outputChannels = 2;
  405
+      m_channelMap     = CAEChannelInfo(OutputMaps[0]);
407 406
       m_channels       = 8; /* FIXME: this should be read out of the stream */
408 407
       m_syncFunc       = &CAEStreamInfo::SyncAC3;
409 408
       m_dataType       = STREAM_TYPE_EAC3;

0 notes on commit 7a18169

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