diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index 3cdcce13b..133efe579 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -38,8 +38,12 @@ use libc; use ffi; impl Pad { - pub fn new_from_static_template(templ: &StaticPadTemplate, name: &str) -> Pad { + pub fn new_from_static_template<'a, P: Into>>( + templ: &StaticPadTemplate, + name: P, + ) -> Pad { assert_initialized_main_thread!(); + let name = name.into(); unsafe { from_glib_none(ffi::gst_pad_new_from_static_template( mut_override(templ.to_glib_none().0),