mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
98e0dec715
commit
6108407db1
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue