Function av_reallocp_array

Source
pub unsafe extern "C" fn av_reallocp_array(
    ptr: *mut c_void,
    nmemb: usize,
    size: usize,
) -> c_int
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.