webrtcbin: tracked maximum pad serial better

If a sink pad with a specific index is requested, also
increase the maximum pad serial number if necessary, so
that mixing fixed sink_X requests with unspecific sink_%u
requests works.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7237>
This commit is contained in:
Jan Schmidt 2024-07-24 20:58:01 +10:00 committed by GStreamer Marge Bot
parent 825f52d38b
commit 87a7a7567f

View file

@ -8285,6 +8285,9 @@ gst_webrtc_bin_request_new_pad (GstElement * element, GstPadTemplate * templ,
/* parse serial number from requested padname */
serial = g_ascii_strtoull (&name[5], NULL, 10);
lock_mline = TRUE;
if (serial >= webrtc->priv->max_sink_pad_serial) {
webrtc->priv->max_sink_pad_serial = serial + 1;
}
}
if (lock_mline) {