gstreamer/device: Device::create_element() is transfer floating, not transfer full

See https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/444
This commit is contained in:
Sebastian Dröge 2019-09-11 22:41:59 +03:00
parent 23fe9efe08
commit 1528510c68
2 changed files with 2 additions and 2 deletions

View file

@ -10836,7 +10836,7 @@ aggregated by #GstDeviceMonitor objects.</doc>
version="1.4"> version="1.4">
<doc xml:space="preserve">Creates the element with all of the required parameters set to use <doc xml:space="preserve">Creates the element with all of the required parameters set to use
this device.</doc> this device.</doc>
<return-value transfer-ownership="full" nullable="1"> <return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a new #GstElement configured to use <doc xml:space="preserve">a new #GstElement configured to use
this device</doc> this device</doc>
<type name="Element" c:type="GstElement*"/> <type name="Element" c:type="GstElement*"/>

View file

@ -57,7 +57,7 @@ pub trait DeviceExt: 'static {
impl<O: IsA<Device>> DeviceExt for O { impl<O: IsA<Device>> DeviceExt for O {
fn create_element(&self, name: Option<&str>) -> Option<Element> { fn create_element(&self, name: Option<&str>) -> Option<Element> {
unsafe { unsafe {
from_glib_full(gst_sys::gst_device_create_element( from_glib_none(gst_sys::gst_device_create_element(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
name.to_glib_none().0, name.to_glib_none().0,
)) ))