Permalink
Browse files

[rbp/omxplayer] Fix crash on stopping mp3 playback with amplification

There is a race condition where we can try to adjust volume after deinitialation
when amplification is enabled, causing a seg fault.
  • Loading branch information...
1 parent 81fd4d3 commit dd1903d209dda5d5431e23ef354e4771d586f554 @popcornmix popcornmix committed Nov 4, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 xbmc/cores/omxplayer/OMXAudio.cpp
@@ -1087,6 +1087,10 @@ unsigned int COMXAudio::AddPackets(const void* data, unsigned int len, double dt
void COMXAudio::UpdateAttenuation()
{
+ // always called with m_critSection lock held
+ if (!m_Initialized || m_Passthrough)
+ return;
+
if (m_amplification == 1.0)
{
ApplyVolume();

0 comments on commit dd1903d

Please sign in to comment.