mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-03-14 01:02:42 +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/1234>
This commit is contained in:
parent
8248425905
commit
2002c54582
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::new(Some(&wb_sink_pad.name()), gst::PadDirection::Sink);
|
||||
|
||||
sink_pad.set_target(Some(&wb_sink_pad)).unwrap();
|
||||
|
|
Loading…
Reference in a new issue