Permalink
Browse files

[rbp] Avoid coming out of stalled state due to uninitialised variable

m_endtime is only initialised when we underrun. Use m_av_clock->OMXAudioBuffer() to protect access to uninitialised variable.
  • Loading branch information...
1 parent 3a7dfb9 commit cca2d306a43c945edc150319c132bbac49dae899 @popcornmix popcornmix committed Mar 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 xbmc/cores/omxplayer/OMXPlayerAudio.cpp
View
2 xbmc/cores/omxplayer/OMXPlayerAudio.cpp
@@ -510,7 +510,7 @@ void OMXPlayerAudio::Process()
// hard unlock audio out buffering
clock_gettime(CLOCK_REALTIME, &m_endtime);
//int iLevel = min(99,m_messageQueue.GetLevel() + MathUtils::round_int(100.0/8.0*GetCacheTime()));
- if(/*iLevel < 10 &&*/ m_stalled && (m_endtime.tv_sec - m_starttime.tv_sec) > 1)
+ if(/*iLevel < 10 &&*/ m_stalled && m_av_clock->OMXAudioBuffer() && (m_endtime.tv_sec - m_starttime.tv_sec) > 1)
{
m_stalled = false;
if(m_av_clock->HasVideo() && m_av_clock->OMXAudioBuffer())

0 comments on commit cca2d30

Please sign in to comment.