summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-12-29 15:21:58 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-12-29 15:21:58 +0000
commit0199de838b226e1f56a1867325c1b84f7891b248 (patch)
tree3632005870b10fb64be4dd047bfec14c827c6409
parentb4a20d3a308c5a6102ee45336a5eca368b9f6314 (diff)
downloadgst-plugins-bad-0199de838b226e1f56a1867325c1b84f7891b248.tar.gz
gst-plugins-bad-0199de838b226e1f56a1867325c1b84f7891b248.tar.bz2
gst-plugins-bad-0199de838b226e1f56a1867325c1b84f7891b248.zip
gst/rtpmanager/rtpsession.c: Only change the SSRC of the session and reset the internal source when the SSRC actually...
Original commit message from CVS: * gst/rtpmanager/rtpsession.c: (rtp_session_set_internal_ssrc): Only change the SSRC of the session and reset the internal source when the SSRC actually changed. See #565910.
-rw-r--r--ChangeLog6
-rw-r--r--gst/rtpmanager/rtpsession.c14
2 files changed, 14 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2846b84c..c0c44b29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-12-29 Wim Taymans <wim.taymans@collabora.co.uk>
+ * gst/rtpmanager/rtpsession.c: (rtp_session_set_internal_ssrc):
+ Only change the SSRC of the session and reset the internal source when
+ the SSRC actually changed. See #565910.
+
+2008-12-29 Wim Taymans <wim.taymans@collabora.co.uk>
+
* gst/rtpmanager/rtpsource.c: (rtp_source_init),
(rtp_source_update_caps), (get_clock_rate):
* gst/rtpmanager/rtpsource.h:
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
index 17ed3b53..b2d8449f 100644
--- a/gst/rtpmanager/rtpsession.c
+++ b/gst/rtpmanager/rtpsession.c
@@ -1193,14 +1193,16 @@ void
rtp_session_set_internal_ssrc (RTPSession * sess, guint32 ssrc)
{
RTP_SESSION_LOCK (sess);
- g_hash_table_steal (sess->ssrcs[sess->mask_idx],
- GINT_TO_POINTER (sess->source->ssrc));
+ if (ssrc != sess->source->ssrc) {
+ g_hash_table_steal (sess->ssrcs[sess->mask_idx],
+ GINT_TO_POINTER (sess->source->ssrc));
- sess->source->ssrc = ssrc;
- rtp_source_reset (sess->source);
+ sess->source->ssrc = ssrc;
+ rtp_source_reset (sess->source);
- g_hash_table_insert (sess->ssrcs[sess->mask_idx],
- GINT_TO_POINTER (sess->source->ssrc), sess->source);
+ g_hash_table_insert (sess->ssrcs[sess->mask_idx],
+ GINT_TO_POINTER (sess->source->ssrc), sess->source);
+ }
RTP_SESSION_UNLOCK (sess);
}