gstrtpbasepayload: use the session's suggested ssrc after a collision, if the session provides one

Conflicts:
	gst-libs/gst/rtp/gstrtpbasepayload.c
This commit is contained in:
George Kiagiadakis 2013-12-26 17:47:46 +02:00 committed by Wim Taymans
parent 98e0dec715
commit 6108407db1

View file

@ -449,10 +449,13 @@ gst_rtp_base_payload_src_event_default (GstRTPBasePayload * rtpbasepayload,
/* choose another ssrc for our stream */
if (ssrc == rtpbasepayload->current_ssrc) {
GstCaps *caps;
guint suggested_ssrc = 0;
do {
if (gst_structure_get_uint (s, "suggested-ssrc", &suggested_ssrc))
rtpbasepayload->current_ssrc = suggested_ssrc;
while (ssrc == rtpbasepayload->current_ssrc)
rtpbasepayload->current_ssrc = g_random_int ();
} while (ssrc == rtpbasepayload->current_ssrc);
caps = gst_pad_get_current_caps (rtpbasepayload->srcpad);
caps = gst_caps_make_writable (caps);