aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project/cmake/scripts/linux/Install.cmake3
-rw-r--r--xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp1
-rw-r--r--xbmc/pvr/PVRManager.cpp12
-rw-r--r--xbmc/pvr/PVRManager.h2
-rw-r--r--xbmc/threads/Thread.cpp2
5 files changed, 14 insertions, 6 deletions
diff --git a/project/cmake/scripts/linux/Install.cmake b/project/cmake/scripts/linux/Install.cmake
index 9a22f2941e..c0a80f7699 100644
--- a/project/cmake/scripts/linux/Install.cmake
+++ b/project/cmake/scripts/linux/Install.cmake
@@ -120,9 +120,6 @@ install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon256x256.png
RENAME ${APP_NAME_LC}.png
DESTINATION ${datarootdir}/icons/hicolor/256x256/apps
COMPONENT kodi)
-install(CODE "execute_process(COMMAND gtk-update-icon-cache -f -q -t
- $ENV{DESTDIR}${datarootdir}/icons/hicolor ERROR_QUIET)"
- COMPONENT kodi)
# Install docs
install(FILES ${CORE_SOURCE_DIR}/copying.txt
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
index 482142e46a..412bcdccae 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
@@ -318,6 +318,7 @@ bool CRenderManager::Configure()
m_renderedOverlay = false;
m_renderDebug = false;
m_clockSync.Reset();
+ CheckEnableClockSync();
m_renderState = STATE_CONFIGURED;
diff --git a/xbmc/pvr/PVRManager.cpp b/xbmc/pvr/PVRManager.cpp
index 66ec738383..aa0782102c 100644
--- a/xbmc/pvr/PVRManager.cpp
+++ b/xbmc/pvr/PVRManager.cpp
@@ -391,6 +391,12 @@ void CPVRManager::Reinit()
void CPVRManager::Start()
{
+ CSingleLock initLock(m_startStopMutex);
+
+ // Note: Stop() must not be called while holding pvr manager's mutex. Stop() calls
+ // StopThread() which can deadlock if the worker thread tries to acquire pvr manager's
+ // lock while StopThread() is waiting for the worker to exit. Thus, we introduce another
+ // lock here (m_startStopMutex), which only gets hold while starting/restarting pvr manager.
Stop();
CSingleLock lock(m_critSection);
@@ -412,8 +418,10 @@ void CPVRManager::Start()
void CPVRManager::Stop(void)
{
+ CSingleLock initLock(m_startStopMutex);
+
/* check whether the pvrmanager is loaded */
- if (IsStopping() || IsStopped())
+ if (IsStopped())
return;
SetState(ManagerStateStopping);
@@ -442,7 +450,7 @@ void CPVRManager::Stop(void)
/* close database */
const CPVRDatabasePtr database(GetTVDatabase());
- if (database->IsOpen())
+ if (database && database->IsOpen())
database->Close();
SetState(ManagerStateStopped);
diff --git a/xbmc/pvr/PVRManager.h b/xbmc/pvr/PVRManager.h
index 05c30fc4b8..67c7c1fe18 100644
--- a/xbmc/pvr/PVRManager.h
+++ b/xbmc/pvr/PVRManager.h
@@ -706,6 +706,8 @@ private:
ManagerState m_managerState;
std::unique_ptr<CStopWatch> m_parentalTimer;
+ CCriticalSection m_startStopMutex; // mutex for protecting pvr manager's start/restart/stop sequence */
+
std::atomic_bool m_isChannelPreview;
CEventSource<PVREvent> m_events;
};
diff --git a/xbmc/threads/Thread.cpp b/xbmc/threads/Thread.cpp
index ea03bb246d..b77ce8f90c 100644
--- a/xbmc/threads/Thread.cpp
+++ b/xbmc/threads/Thread.cpp
@@ -85,7 +85,7 @@ void CThread::Create(bool bAutoDelete, unsigned stacksize)
{
if (m_ThreadId != 0)
{
- LOG(LOGERROR, "%s - fatal error creating thread- old thread id not null", __FUNCTION__);
+ LOG(LOGERROR, "%s - fatal error creating thread %s - old thread id not null", __FUNCTION__, m_ThreadName.c_str());
exit(1);
}
m_iLastTime = XbmcThreads::SystemClockMillis() * 10000;