mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
webrtc: Fixes for matching pads to unassociated transceivers
Fix an inverted condition when checking if sink pad caps match the codec-preference of an unassociated transceiver, and fix a condition check for transceiver media kind to avoid matching sinkpad requests where caps aren't provided against unassociated transceivers where the caps might not match later. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7237>
This commit is contained in:
parent
87a7a7567f
commit
09d870a39c
1 changed files with 3 additions and 3 deletions
|
@ -8357,9 +8357,9 @@ gst_webrtc_bin_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
|||
GstWebRTCBinPad *pad2;
|
||||
gboolean has_matching_caps;
|
||||
|
||||
/* Ignore transceivers with a non-matching kind */
|
||||
/* Ignore transceivers with a non-matching kind or where we don't know the kind we want */
|
||||
if (tmptrans->kind != GST_WEBRTC_KIND_UNKNOWN &&
|
||||
kind != GST_WEBRTC_KIND_UNKNOWN && tmptrans->kind != kind)
|
||||
(kind == GST_WEBRTC_KIND_UNKNOWN || tmptrans->kind != kind))
|
||||
continue;
|
||||
|
||||
/* Ignore stopped transmitters */
|
||||
|
@ -8381,7 +8381,7 @@ gst_webrtc_bin_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
|||
|
||||
GST_OBJECT_LOCK (tmptrans);
|
||||
has_matching_caps = (caps && tmptrans->codec_preferences &&
|
||||
!gst_caps_can_intersect (caps, tmptrans->codec_preferences));
|
||||
gst_caps_can_intersect (caps, tmptrans->codec_preferences));
|
||||
GST_OBJECT_UNLOCK (tmptrans);
|
||||
/* Ignore transceivers with non-matching caps */
|
||||
if (!has_matching_caps)
|
||||
|
|
Loading…
Reference in a new issue