[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
Wed Mar 2 23:01:58 UTC 2016


The following commit has been merged in the master branch:
commit eab45c012cdfa9ee6177fdb0c4d2da82957b4d80
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 cb875bb..f04a5e0 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 e0869ac..87f48d1 100644
--- a/src/Tvheadend.h
+++ b/src/Tvheadend.h
@@ -280,6 +280,7 @@ private:
   std::map<int,int>                       m_streamStat;
   int64_t                                 m_seekTime;
   PLATFORM::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