av_fast_malloc

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

Contrary to av_fast_realloc the current buffer contents might not be preserved and on error the old buffer is freed, thus no special handling to avoid memleaks is necessary.

@param ptr pointer to pointer to already allocated buffer, overwritten with pointer to new buffer @param size size of the buffer *ptr points to @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and *size 0 if an error occurred.

@nogc nothrow extern (C)
void
av_fast_malloc
(
void* ptr
,
uint* size
,
size_t min_size
)

Meta