diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index 41c659c881..8def7cf0a6 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -4432,7 +4432,7 @@ _create_pad_for_sdp_media (GstWebRTCBin * webrtc, GstPadDirection direction, if (serial == G_MAXUINT) serial = webrtc->priv->max_sink_pad_serial++; } else { - serial = trans->mline; + serial = webrtc->priv->src_pad_counter++; } pad_name = diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.h b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.h index b80a54ad67..232bb451eb 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.h +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.h @@ -95,6 +95,7 @@ struct _GstWebRTCBinClass struct _GstWebRTCBinPrivate { guint max_sink_pad_serial; + guint src_pad_counter; gboolean bundle; GPtrArray *transceivers;