[SCM] kodi-pvr-hts/master: ensure signal and quality info is always mutex protected
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 a7d919a13efc188446144aa1d5c9c5fed0ca2a31
Author: Sam Stenvall <sam.stenvall at nordsoftware.com>
Date: Thu Jan 28 11:34:59 2016 +0200
ensure signal and quality info is always mutex protected
diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
index 451858b..fa7758e 100644
--- a/src/HTSPDemuxer.cpp
+++ b/src/HTSPDemuxer.cpp
@@ -53,9 +53,7 @@ void CHTSPDemuxer::Connected ( void )
m_subscription.SendSubscribe(0, 0, true);
m_subscription.SendSpeed(0, true);
- /* Reset status */
- m_signalInfo.Clear();
- m_sourceInfo.Clear();
+ ResetStatus();
}
}
@@ -96,8 +94,7 @@ bool CHTSPDemuxer::Open ( uint32_t channelId, enum eSubscriptionWeight weight )
m_subscription.SendSubscribe(channelId, weight);
/* Reset status */
- m_signalInfo.Clear();
- m_sourceInfo.Clear();
+ ResetStatus();
/* Send unsubscribe if subscribing failed */
if (!m_subscription.IsActive())
@@ -256,6 +253,14 @@ bool CHTSPDemuxer::IsRealTimeStream() const
return false;
}
+void CHTSPDemuxer::ResetStatus()
+{
+ CLockObject lock(m_mutex);
+
+ m_signalInfo.Clear();
+ m_sourceInfo.Clear();
+}
+
/* **************************************************************************
* Parse incoming data
* *************************************************************************/
diff --git a/src/Tvheadend.h b/src/Tvheadend.h
index cd54c52..4c5e2b2 100644
--- a/src/Tvheadend.h
+++ b/src/Tvheadend.h
@@ -303,6 +303,11 @@ private:
void Weight ( tvheadend::eSubscriptionWeight weight );
PVR_ERROR CurrentStreams ( PVR_STREAM_PROPERTIES *streams );
PVR_ERROR CurrentSignal ( PVR_SIGNAL_STATUS &sig );
+
+ /**
+ * Resets the signal and quality info
+ */
+ void ResetStatus();
void ParseMuxPacket ( htsmsg_t *m );
void ParseSourceInfo ( htsmsg_t *m );
--
kodi-pvr-hts packaging
More information about the pkg-multimedia-commits
mailing list