mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 19:41:00 +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(
|
||||
&self,
|
||||
templ: &gst::PadTemplate,
|
||||
_templ: &gst::PadTemplate,
|
||||
name: Option<&str>,
|
||||
caps: Option<&gst::Caps>,
|
||||
) -> 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)
|
||||
.name(wb_sink_pad.name())
|
||||
.build();
|
||||
|
|
Loading…
Reference in a new issue