summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmanager/rtpsession.c14
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);
}