Skip to content
This repository
Browse code

[rbp/omxplayer] Fix uninitialised variable that can lose audio packet

The uninitialised variable meant the first run through Decode goes through the non-passthrough path (when passthrough)
and so doesn't get correctly submitted and is discarded
  • Loading branch information...
commit ce7a8c1ca996d3d17665a8fa604ea2ef89face68 1 parent 60d1fd5
popcornmix authored

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  xbmc/cores/omxplayer/OMXPlayerAudio.cpp
3  xbmc/cores/omxplayer/OMXPlayerAudio.cpp
@@ -148,6 +148,9 @@ void OMXPlayerAudio::OpenStream(CDVDStreamInfo &hints, COMXAudioCodecOMX *codec)
148 148
   m_stalled         = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0;
149 149
   m_use_passthrough = (CSettings::Get().GetInt("audiooutput.mode") == AUDIO_HDMI) ? true : false ;
150 150
   m_use_hw_decode   = g_advancedSettings.m_omxHWAudioDecode;
  151
+  m_format.m_dataFormat    = GetDataFormat(m_hints);
  152
+  m_format.m_sampleRate    = 0;
  153
+  m_format.m_channelLayout = 0;
151 154
 }
152 155
 
153 156
 bool OMXPlayerAudio::CloseStream(bool bWaitForBuffers)

0 notes on commit ce7a8c1

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