Function av_realloc_array

Source
pub unsafe extern "C" fn av_realloc_array(
    ptr: *mut c_void,
    nmemb: usize,
    size: usize,
) -> *mut c_void
Expand description

Allocate, reallocate, or free an array.

If ptr is NULL and nmemb > 0, allocate a new block.

@param ptr Pointer to a memory block already allocated with av_realloc() or NULL @param nmemb Number of elements in the array @param size Size of the single element of the array

@return Pointer to a newly-reallocated block or NULL if the block cannot be reallocated

@warning Unlike av_malloc(), the allocated memory is not guaranteed to be correctly aligned. The returned pointer must be freed after even if nmemb is zero. @see av_reallocp_array()