pub unsafe extern "C" fn av_realloc(
ptr: *mut c_void,
size: usize,
) -> *mut c_void
Expand description
Allocate, reallocate, or free a block of memory.
If ptr
is NULL
and size
> 0, allocate a new block. Otherwise, expand or
shrink that block of memory according to size
.
@param ptr Pointer to a memory block already allocated with
av_realloc() or NULL
@param size Size in bytes of the memory block to be allocated or
reallocated
@return Pointer to a newly-reallocated block or NULL
if the block
cannot be reallocated
@warning Unlike av_malloc(), the returned pointer is not guaranteed to be correctly aligned. The returned pointer must be freed after even if size is zero. @see av_fast_realloc() @see av_reallocp()