[SCM] kodi-pvr-hts/master: avoid locking multiple times in CHTSPDemuxer::IsRealTimeStream()
tiber-guest at users.alioth.debian.org
tiber-guest at users.alioth.debian.org
Fri Nov 4 23:23:35 UTC 2016
The following commit has been merged in the master branch:
commit 70570162e1fc5ca77c263f3b143e2cb237581324
Author: Sam Stenvall <sam.stenvall at nordsoftware.com>
Date: Fri Jan 29 10:15:14 2016 +0200
avoid locking multiple times in CHTSPDemuxer::IsRealTimeStream()
diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
index 449a509..870999e 100644
--- a/src/HTSPDemuxer.cpp
+++ b/src/HTSPDemuxer.cpp
@@ -288,10 +288,14 @@ void CHTSPDemuxer::SetStreamingProfile(const std::string &profile)
bool CHTSPDemuxer::IsRealTimeStream() const
{
- if (GetTimeshiftTime() == 0)
+ /* Avoid using the getters since they lock individually and
+ * we want the calculation to be consistent */
+ CLockObject lock(m_mutex);
+
+ if (m_timeshiftStatus.shift == 0)
return true;
- if (GetTimeshiftBufferEnd() - GetTimeshiftTime() < 10)
+ if (m_timeshiftStatus.start - m_timeshiftStatus.shift < 10)
return true;
return false;
--
kodi-pvr-hts packaging
More information about the pkg-multimedia-commits
mailing list