From: Wim Taymans Date: Mon, 29 Dec 2008 15:21:58 +0000 (+0000) Subject: gst/rtpmanager/rtpsession.c: Only change the SSRC of the session and reset the intern... X-Git-Tag: 1.19.3~509^2~9838 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1786eb1e253c1a21b413f13028745700efa9c1c6;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 17ed3b5..b2d8449 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); }