Free memory of the correct type for the callback structs in appsink/appsrc

This commit is contained in:
Sebastian Dröge 2017-11-11 16:05:08 +01:00
parent 918d66375e
commit c3b1c53812
2 changed files with 2 additions and 2 deletions

View file

@ -79,7 +79,7 @@ unsafe extern "C" fn trampoline_new_sample(
unsafe extern "C" fn destroy_callbacks(ptr: gpointer) { unsafe extern "C" fn destroy_callbacks(ptr: gpointer) {
let _guard = CallbackGuard::new(); let _guard = CallbackGuard::new();
Box::<Box<AppSinkCallbacks>>::from_raw(ptr as *mut _); Box::<AppSinkCallbacks>::from_raw(ptr as *mut _);
} }
impl AppSink { impl AppSink {

View file

@ -80,7 +80,7 @@ unsafe extern "C" fn trampoline_seek_data(
unsafe extern "C" fn destroy_callbacks(ptr: gpointer) { unsafe extern "C" fn destroy_callbacks(ptr: gpointer) {
let _guard = CallbackGuard::new(); let _guard = CallbackGuard::new();
Box::<Box<AppSrcCallbacks>>::from_raw(ptr as *mut _); Box::<AppSrcCallbacks>::from_raw(ptr as *mut _);
} }
impl AppSrc { impl AppSrc {