mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-23 03:50:59 +00:00
whipsink: Request pads with webrtcbin's pad templates and not our own
It's invalid to request pads with a pad template that is not part of the element, and results in a critical warning. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1223>
This commit is contained in:
parent
44a395f134
commit
e3c46b40a0
1 changed files with 3 additions and 2 deletions
|
@ -130,11 +130,12 @@ impl ElementImpl for WhipSink {
|
||||||
|
|
||||||
fn request_new_pad(
|
fn request_new_pad(
|
||||||
&self,
|
&self,
|
||||||
templ: &gst::PadTemplate,
|
_templ: &gst::PadTemplate,
|
||||||
name: Option<&str>,
|
name: Option<&str>,
|
||||||
caps: Option<&gst::Caps>,
|
caps: Option<&gst::Caps>,
|
||||||
) -> Option<gst::Pad> {
|
) -> Option<gst::Pad> {
|
||||||
let wb_sink_pad = self.webrtcbin.request_pad(templ, name, caps)?;
|
let webrtcsink_templ = self.webrtcbin.pad_template("sink_%u").unwrap();
|
||||||
|
let wb_sink_pad = self.webrtcbin.request_pad(&webrtcsink_templ, name, caps)?;
|
||||||
let sink_pad = gst::GhostPad::builder(gst::PadDirection::Sink)
|
let sink_pad = gst::GhostPad::builder(gst::PadDirection::Sink)
|
||||||
.name(wb_sink_pad.name())
|
.name(wb_sink_pad.name())
|
||||||
.build();
|
.build();
|
||||||
|
|
Loading…
Reference in a new issue