forked from mirrors/gstreamer-rs
gstreamer/element: Use from_glib_none() for the release_pad() trampoline
The reference to the pad we get passed is not guaranteed to be valid for the whole scope of release_pad(). It might be the last reference as owned by GstElement, and gst_element_remove_pad() would destroy it then.
This commit is contained in:
parent
ec3a11cec1
commit
2ead2e60eb
1 changed files with 1 additions and 1 deletions
|
@ -373,7 +373,7 @@ unsafe extern "C" fn element_release_pad<T: ObjectSubclass>(
|
|||
let wrap: Element = from_glib_borrow(ptr);
|
||||
|
||||
gst_panic_to_error!(&wrap, &instance.panicked(), (), {
|
||||
imp.release_pad(&wrap, &from_glib_borrow(pad))
|
||||
imp.release_pad(&wrap, &from_glib_none(pad))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue