diff options
author | Havard Graff <havard.graff@tandberg.com> | 2009-08-31 18:37:40 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-09-24 13:56:56 +0200 |
commit | 062568a9f53632b6bca5803d2d381741fc387b1d (patch) | |
tree | 0e7c18f3a932d043e3fa338074d525094541c394 | |
parent | ce007b244ed7f9aa006936c0722caea312e241da (diff) |
rtpsession: relax third-party collision detection
If the source has been inactive for some time, we assume that it has
simply changed its transport source address. Hence, there is no true
third-party collision - only a simulated one.
Fixes #630447
-rw-r--r-- | gst/rtpmanager/rtpsession.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 3f0bd3b6c..c637005ec 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -1096,6 +1096,25 @@ check_collision (RTPSession * sess, RTPSource * source, * Maybe should be done in upper layer, only the SDES can tell us * if its a collision or a loop */ + + /* If the source has been inactive for some time, we assume that it has + * simply changed its transport source address. Hence, there is no true + * third-party collision - only a simulated one. */ + if (arrival->time > source->last_activity) { + GstClockTime inactivity_period = arrival->time - source->last_activity; + if (inactivity_period > 1*GST_SECOND) { + /* Use new network address */ + if (rtp) { + g_assert (source->have_rtp_from); + rtp_source_set_rtp_from (source, &arrival->address); + } + else { + g_assert (source->have_rtcp_from); + rtp_source_set_rtcp_from (source, &arrival->address); + } + return FALSE; + } + } } else { /* This is sending with our ssrc, is it an address we already know */ |