xbmc: add PR2505

This commit is contained in:
Stefan Saraev 2013-03-29 20:42:20 +02:00 committed by Stephan Raue
parent a3c3fa5cce
commit 6256e166aa

View File

@ -0,0 +1,27 @@
From c0e50094715d41da30d0a08140e7fd1c149c453b Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Tue, 26 Mar 2013 23:17:51 +0100
Subject: [PATCH] AE: possible segfault after suspend / resume (m_sink might be
gone)
---
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
index 6ec78c5..7aaecf5 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -1536,7 +1536,8 @@ inline void CSoftAE::ProcessSuspend()
*/
if (!m_isSuspended && (!m_playingStreams.empty() || !m_playing_sounds.empty()))
{
- m_reOpen = !m_sink->SoftResume() || m_reOpen; // sink returns false if it requires reinit (worthless with current implementation)
+ // the sink might still be not initialized after Resume of real suspend
+ m_reOpen = m_sink && (!m_sink->SoftResume() || m_reOpen); // sink returns false if it requires reinit (worthless with current implementation)
m_sinkIsSuspended = false; //sink processing data
m_softSuspend = false; //break suspend loop (under some conditions)
CLog::Log(LOGDEBUG, "Resumed the Sink");
--
1.8.1.5