wtay gst-plugins-bad: gst-plugins-bad/ gst-plugins-bad/gst/rtpmanager/

[email protected] Mon, 29 Dec 2008 07:22:13 -0800 (PST)
Newsgroups gmane.comp.video.gstreamer.cvs
Message-ID <[email protected]>
CVS Root:       /cvs/gstreamer
Module:         gst-plugins-bad
Changes by:     wtay
Date:           Mon Dec 29 2008  15:22:13 UTC

Log message:
* 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.

Modified files:
    .               : ChangeLog
    gst/rtpmanager  : rtpsession.c

Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ChangeLog.diff?r1=1.3834&r2=1.3835
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/rtpmanager/rtpsession.c.diff?r1=1.40&r2=1.41

====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ChangeLog,v
retrieving revision 1.3834
retrieving revision 1.3835
diff -u -d -r1.3834 -r1.3835
--- ChangeLog	29 Dec 2008 14:21:45 -0000	1.3834
+++ ChangeLog	29 Dec 2008 15:21:56 -0000	1.3835
@@ -1,5 +1,11 @@
 2008-12-29  Wim Taymans  <[email protected]>
 
+	* 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  <[email protected]>
 	* gst/rtpmanager/rtpsource.c: (rtp_source_init),
 	(rtp_source_update_caps), (get_clock_rate):
 	* gst/rtpmanager/rtpsource.h:
Index: rtpsession.c
RCS file: /cvs/gstreamer/gst-plugins-bad/gst/rtpmanager/rtpsession.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- rtpsession.c	26 Nov 2008 12:40:18 -0000	1.40
+++ rtpsession.c	29 Dec 2008 15:21:58 -0000	1.41
@@ -1193,14 +1193,16 @@
 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);
 }

------------------------------------------------------------------------------