Function ffmpeg_sys_the_third::av_fast_mallocz

source ·
pub unsafe extern "C" fn av_fast_mallocz(
    ptr: *mut c_void,
    size: *mut c_uint,
    min_size: usize
)
Expand description

Allocate and clear a buffer, reusing the given one if large enough.

Like av_fast_malloc(), but all newly allocated space is initially cleared. Reused buffer is not cleared.

*ptr is allowed to be NULL, in which case allocation always happens if size_needed is greater than 0.

@param[in,out] ptr Pointer to pointer to an already allocated buffer. *ptr will be overwritten with pointer to new buffer on success or NULL on failure @param[in,out] size Pointer to the size of buffer *ptr. *size is updated to the new allocated size, in particular 0 in case of failure. @param[in] min_size Desired minimal size of buffer *ptr @see av_fast_malloc()