Skip to content

Instantly share code, notes, and snippets.

@rajneeshksoni
Created December 22, 2023 05:40
Show Gist options
  • Save rajneeshksoni/673f0ee40f2ff9a4b6e321c45e9957c2 to your computer and use it in GitHub Desktop.
Save rajneeshksoni/673f0ee40f2ff9a4b6e321c45e9957c2 to your computer and use it in GitHub Desktop.
From e0f4089f1bf453811c68e614a86704d40713bbbf Mon Sep 17 00:00:00 2001
From: Sanchayan Maity <sanchayan@asymptotic.io>
Date: Thu, 19 Oct 2023 13:13:32 +0530
Subject: [PATCH] webrtcbin: Fix transceiver matching with FEC decoder for PCMU
When using PCMU, the payload type can be 0. When `rtpbin` requests
FEC decoder and passes a payload type of 0, the check on payload
type in `try_match_transceiver_with_fec_decoder` resulted in the
FEC decoder not being set on the transceiver. This then resulted
in code setting pass through on the `rtpulpfecdec` being bypassed
in `_set_internal_rtpbin_element_props_from_stream`. We need to
set pass through on `rtpulpfecdec` as it is broken.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/581
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3212
---
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
index 68f345407b..82ae40aa0b 100644
--- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
+++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
@@ -4990,17 +4990,17 @@ try_match_transceiver_with_fec_decoder (GstWebRTCBin * webrtc,
GstElement *fecdec = GST_ELEMENT (l->data);
gboolean found_transceiver = FALSE;
int original_pt;
guint i;
original_pt =
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (fecdec),
GST_WEBRTC_PAYLOAD_TYPE));
- if (original_pt <= 0) {
+ if (original_pt < 0) {
GST_WARNING_OBJECT (trans, "failed to match fec decoder with "
"transceiver, fec decoder %" GST_PTR_FORMAT " does not contain a "
"valid payload type", fecdec);
continue;
}
for (i = 0; i < trans->stream->ptmap->len; i++) {
PtMapItem *item = &g_array_index (trans->stream->ptmap, PtMapItem, i);
--
2.42.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment