/* this is an internal source that is not using our suggested ssrc.
* since there must be another source using this ssrc, we can remove
* this one instead of making it a receiver forever */
- if (source->ssrc != sess->suggested_ssrc) {
+ if (source->ssrc != sess->suggested_ssrc
+ && source->media_ssrc != sess->suggested_ssrc) {
rtp_source_mark_bye (source, "timed out");
/* do not schedule bye here, since we are inside the RTCP timeout
* processing and scheduling bye will interfere with SR/RR sending */
GstStructure *s;
guint val;
gint ival;
+ guint ssrc, rtx_ssrc = -1;
gboolean rtx;
/* nothing changed, return */
s = gst_caps_get_structure (caps, 0);
- rtx = (gst_structure_get_uint (s, "rtx-ssrc", &val) && val == src->ssrc);
+ if (!gst_structure_get_uint (s, "ssrc", &ssrc))
+ return;
+ gst_structure_get_uint (s, "rtx-ssrc", &rtx_ssrc);
+
+ if (src->ssrc != ssrc && src->ssrc != rtx_ssrc) {
+ GST_WARNING ("got ssrc %u/%u that doesn't match with this source's ssrc %u",
+ ssrc, rtx_ssrc, src->ssrc);
+ return;
+ }
+
+ rtx = (rtx_ssrc == src->ssrc);
if (gst_structure_get_int (s, rtx ? "rtx-payload" : "payload", &ival))
src->payload = ival;
src->seqnum_offset);
gst_caps_replace (&src->send_caps, caps);
+
+ if (rtx) {
+ src->media_ssrc = ssrc;
+ } else {
+ src->media_ssrc = -1;
+ }
}
/**