[SCM] kodi-pvr-hts/master: demuxer - Seek - set m_seekTime variable to zero before Wait()
tiber-guest at users.alioth.debian.org
tiber-guest at users.alioth.debian.org
Fri Nov 4 23:23:33 UTC 2016
The following commit has been merged in the master branch:
commit 457f9de937b94d29d115d5d907a9c7944f3253b3
Author: Jaroslav Kysela <perex at perex.cz>
Date: Fri Dec 18 20:37:55 2015 +0100
demuxer - Seek - set m_seekTime variable to zero before Wait()
It's really a fatal error. If the predicate is not set to zero,
then _PredicateCallbackDefault() function (see platform/mutex.h)
gives true return value. It means that Wait() returns ASAP.
This also means that m_seekTime must not be set to a zero value
in the ParseSubscriptionSkip().
diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
index 957ccb2..a999c23 100644
--- a/src/HTSPDemuxer.cpp
+++ b/src/HTSPDemuxer.cpp
@@ -165,6 +165,7 @@ bool CHTSPDemuxer::Seek
m_seeking = true;
/* Wait for time */
+ m_seekTime = 0;
if (!m_seekCond.Wait(m_conn.Mutex(), m_seekTime, Settings::GetInstance().GetResponseTimeout()))
{
Logger::Log(LogLevel::LEVEL_ERROR, "failed to get subscriptionSeek response");
@@ -178,7 +179,7 @@ bool CHTSPDemuxer::Seek
return false;
/* Store */
- *startpts = TVH_TO_DVD_TIME(m_seekTime);
+ *startpts = TVH_TO_DVD_TIME(m_seekTime - 1);
Logger::Log(LogLevel::LEVEL_TRACE, "demux seek startpts = %lf", *startpts);
return true;
@@ -511,7 +512,7 @@ void CHTSPDemuxer::ParseSubscriptionSkip ( htsmsg_t *m )
if (htsmsg_get_s64(m, "time", &s64)) {
m_seekTime = INVALID_SEEKTIME;
} else {
- m_seekTime = s64;
+ m_seekTime = s64 < 0 ? 1 : s64 + 1; /* it must not be zero! */
}
Flush(); /* flush old packets (with wrong pts) */
m_seekCond.Broadcast();
--
kodi-pvr-hts packaging
More information about the pkg-multimedia-commits
mailing list