buffer_pool: use to_glib_none() to cast BufferPoolAcquireParams

This commit is contained in:
Guillaume Desmottes 2019-05-07 13:27:07 +05:30
parent fca4441a72
commit 05519219ef

View file

@ -296,11 +296,7 @@ impl<O: IsA<BufferPool>> BufferPoolExtManual for O {
&self, &self,
params: P, params: P,
) -> Result<::Buffer, ::FlowError> { ) -> Result<::Buffer, ::FlowError> {
let params = params.into(); let params_ptr = params.into().to_glib_none().0 as *mut _;
let params_ptr = match params {
Some(params) => &params.0 as *const _ as *mut _,
None => ptr::null_mut(),
};
unsafe { unsafe {
let mut buffer = ptr::null_mut(); let mut buffer = ptr::null_mut();