From 5afa1858edd91dcc84fece6138f3ae936a917eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 29 Jul 2017 13:52:46 +0100 Subject: [PATCH] Fix handling of pad probe info data for real The miniobjects passed are never going to be writeable due to the additional reference, but can safely be replaced. --- gstreamer/src/pad.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index 93bc95ffe..663ae9acf 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -19,8 +19,7 @@ use std::mem::transmute; use std::ptr; use glib::{IsA, StaticType}; -use glib::translate::{ToGlib, FromGlib, from_glib, from_glib_none, from_glib_borrow, - from_glib_full}; +use glib::translate::{ToGlib, FromGlib, from_glib, from_glib_none, from_glib_full}; use glib::source::CallbackGuard; use glib_ffi::gpointer; @@ -165,12 +164,12 @@ unsafe extern "C" fn trampoline_pad_probe( if (*data).type_ == Buffer::static_type().to_glib() { data_type = Some(Buffer::static_type()); Some(PadProbeData::Buffer( - from_glib_borrow(data as *const ffi::GstBuffer), + from_glib_none(data as *const ffi::GstBuffer), )) } else if (*data).type_ == BufferList::static_type().to_glib() { data_type = Some(BufferList::static_type()); Some(PadProbeData::BufferList( - from_glib_borrow(data as *const ffi::GstBufferList), + from_glib_none(data as *const ffi::GstBufferList), )) } else { Some(PadProbeData::Unknown)