mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
webrtcbin: Enforce compatible caps on pad request
If a pad is requested with certain caps and there is already a transceiver, reject the pad request if the caps don't match. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
This commit is contained in:
parent
902e40cae2
commit
249b2d54d7
1 changed files with 10 additions and 0 deletions
|
@ -6234,6 +6234,16 @@ gst_webrtc_bin_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
||||||
gst_object_unref (pad2);
|
gst_object_unref (pad2);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (caps && trans->codec_preferences) {
|
||||||
|
if (!gst_caps_can_intersect (caps, trans->codec_preferences)) {
|
||||||
|
GST_ERROR_OBJECT (element, "Tried to request a new sink pad %s for"
|
||||||
|
" existing m-line %d, but requested caps %" GST_PTR_FORMAT
|
||||||
|
" don't match existing codec preferences %" GST_PTR_FORMAT,
|
||||||
|
name, serial, caps, trans->codec_preferences);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue