From 87a7a7567f2a8941d17334a176f8ecd24288380f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 24 Jul 2024 20:58:01 +1000 Subject: [PATCH] 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: --- subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index c4954e4bfe..61b8127d9c 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -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) {