[SCM] kodi-pvr-hts/master: muxer - flush the queued packets with wrong pts on seek
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 f265544b04d5911ec35314dc3363b9239085613e
Author: Jaroslav Kysela <perex at perex.cz>
Date: Fri Dec 18 18:38:00 2015 +0100
muxer - flush the queued packets with wrong pts on seek
diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
index 87c7483..957ccb2 100644
--- a/src/HTSPDemuxer.cpp
+++ b/src/HTSPDemuxer.cpp
@@ -162,13 +162,18 @@ bool CHTSPDemuxer::Seek
if (!m_subscription.SendSeek(time))
return false;
+ m_seeking = true;
+
/* Wait for time */
if (!m_seekCond.Wait(m_conn.Mutex(), m_seekTime, Settings::GetInstance().GetResponseTimeout()))
{
Logger::Log(LogLevel::LEVEL_ERROR, "failed to get subscriptionSeek response");
+ m_seeking = false;
+ Flush(); /* try to resync */
return false;
}
+ m_seeking = false;
if (m_seekTime == INVALID_SEEKTIME)
return false;
@@ -508,6 +513,7 @@ void CHTSPDemuxer::ParseSubscriptionSkip ( htsmsg_t *m )
} else {
m_seekTime = s64;
}
+ Flush(); /* flush old packets (with wrong pts) */
m_seekCond.Broadcast();
}
diff --git a/src/Tvheadend.h b/src/Tvheadend.h
index 8d93fa0..2db154d 100644
--- a/src/Tvheadend.h
+++ b/src/Tvheadend.h
@@ -280,6 +280,7 @@ private:
std::map<int,int> m_streamStat;
int64_t m_seekTime;
P8PLATFORM::CCondition<volatile int64_t> m_seekCond;
+ bool m_seeking;
tvheadend::status::SourceInfo m_sourceInfo;
tvheadend::status::Quality m_signalInfo;
tvheadend::status::TimeshiftStatus m_timeshiftStatus;
--
kodi-pvr-hts packaging
More information about the pkg-multimedia-commits
mailing list