From c4971a456ece5f7e956723e6812acba6e1a96c17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Wed, 15 Jun 2022 15:06:20 -0400 Subject: [PATCH] webrtcbin: Limit sink query to sink pads This allows the reception of streams that don't exactly match the codec preferences. In particular, the ssrc in the codec preferences is local sender SSRC, the other side is expected to send a different SSRC. Part-of: --- subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index cfc32f0..978adec 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -459,8 +459,10 @@ gst_webrtc_bin_pad_new (const gchar * name, GstPadDirection direction) direction, "template", template, NULL); gst_object_unref (template); - gst_pad_set_event_function (GST_PAD (pad), gst_webrtcbin_sink_event); - gst_pad_set_query_function (GST_PAD (pad), gst_webrtcbin_sink_query); + if (direction == GST_PAD_SINK) { + gst_pad_set_event_function (GST_PAD (pad), gst_webrtcbin_sink_event); + gst_pad_set_query_function (GST_PAD (pad), gst_webrtcbin_sink_query); + } GST_DEBUG_OBJECT (pad, "new visible pad with direction %s", direction == GST_PAD_SRC ? "src" : "sink"); -- 2.7.4