Table of Contents

av_freep

Overview

Defined in mem.h

Frees a memory block which has been allocated with av_malloc or av_realloc and set the pointer pointing to it to NULL.

void av_freep(void *ptr);

Parameters

ptr

void *ptr

Pointer to the pointer to the memory block which should be freed.
NOTE: ptr should be declared as a void**, eg. it should be used as in the following example:

void *p = av_malloc(42);
av_freep(&p);
// Now the memory is freed, and p has the value NULL.

Using av_freep is equivalent to using av_free and manually setting the pointer to NULL afterwards.

Return value

NONE

See also

av_free(), av_malloc(), av_realloc()


Back to ffmpeg