Function rsmpeg::ffi::av_reallocp_array[][src]

pub unsafe extern "C" fn av_reallocp_array(
    ptr: *mut c_void,
    nmemb: u32,
    size: u32
) -> i32
Expand description

Allocate, reallocate, or free an array through a pointer to a pointer.

If *ptr is NULL and nmemb > 0, allocate a new block. If nmemb is zero, free the memory block pointed to by *ptr.

@param[in,out] ptr Pointer to a pointer to a memory block already allocated with av_realloc(), or a pointer to NULL. The pointer is updated on success, or freed on failure. @param[in] nmemb Number of elements @param[in] size Size of the single element

@return Zero on success, an AVERROR error code on failure

@warning Unlike av_malloc(), the allocated memory is not guaranteed to be correctly aligned.