diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-12-29 15:21:58 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-11 02:30:40 +0100 |
commit | 1786eb1e253c1a21b413f13028745700efa9c1c6 (patch) | |
tree | 45bc555bdee679607e4540ebd56cf39e3b131fd9 /gst/rtpmanager | |
parent | 3fe87f7eab5982f2326e95d868d01fb1bc7a00f5 (diff) |
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.
Diffstat (limited to 'gst/rtpmanager')
-rw-r--r-- | gst/rtpmanager/rtpsession.c | 14 |
1 files changed, 8 insertions, 6 deletions
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); } |