pub unsafe extern "C" fn av_buffer_pool_init2(
size: c_int,
opaque: *mut c_void,
alloc: Option<unsafe extern "C" fn(opaque: *mut c_void, size: c_int) -> *mut AVBufferRef>,
pool_free: Option<unsafe extern "C" fn(opaque: *mut c_void)>,
) -> *mut AVBufferPool
Expand description
Allocate and initialize a buffer pool with a more complex allocator.
@param size size of each buffer in this pool @param opaque arbitrary user data used by the allocator @param alloc a function that will be used to allocate new buffers when the pool is empty. @param pool_free a function that will be called immediately before the pool is freed. I.e. after av_buffer_pool_uninit() is called by the caller and all the frames are returned to the pool and freed. It is intended to uninitialize the user opaque data. @return newly created buffer pool on success, NULL on error.