xbmc: add PR2641

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-04-21 17:40:31 +02:00
parent 09c5c6f662
commit 397e89ed1a

View File

@ -0,0 +1,28 @@
From 067058c557dde84300efe56e8881aed3a6caf75b Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Thu, 18 Apr 2013 01:30:05 +0100
Subject: [PATCH] [rbp/omxplayer] Fix audio volume jumps when switching tracks
When the global volume has been set low, and a sequence of tracks are being played, there are complaints of occasional jumps to full volume.
This is down to a race condition where the volume request can arrive at OMXAudio before it has been initialised.
The fix is simple, don't send the volume change until m_CurrentAudio.started.
---
xbmc/cores/omxplayer/OMXPlayer.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
index 313833e..1b6cb52 100644
--- a/xbmc/cores/omxplayer/OMXPlayer.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -1302,7 +1302,7 @@ void COMXPlayer::Process()
if (IsBetterStream(m_CurrentSubtitle, pStream)) OpenSubtitleStream(pStream->iId, pStream->source);
if (IsBetterStream(m_CurrentTeletext, pStream)) OpenTeletextStream(pStream->iId, pStream->source);
- if(m_change_volume)
+ if(m_change_volume && m_CurrentAudio.started)
{
m_player_audio.SetCurrentVolume(m_current_mute ? VOLUME_MINIMUM : m_current_volume);
m_change_volume = false;
--
1.8.1.6