gst/rtpmanager/rtpsession.c: Only change the SSRC of the session and reset the intern...
authorWim Taymans <wim.taymans@gmail.com>
Mon, 29 Dec 2008 15:21:58 +0000 (15:21 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 29 Dec 2008 15:21:58 +0000 (15:21 +0000)
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.

ChangeLog
gst/rtpmanager/rtpsession.c

index 2846b84..c0c44b2 100644 (file)
--- 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:
index 17ed3b5..b2d8449 100644 (file)
@@ -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);
 }