macrofree av_freep()
Originally committed as revision 2839 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -103,9 +103,13 @@ void av_free_static(void)
|
||||
last_static = 0;
|
||||
}
|
||||
|
||||
/* cannot call it directly because of 'void **' casting is not automatic */
|
||||
void __av_freep(void **ptr)
|
||||
/**
|
||||
* Frees memory and sets the pointer to NULL.
|
||||
* @param arg pointer to the pointer which should be freed
|
||||
*/
|
||||
void av_freep(void *arg)
|
||||
{
|
||||
void **ptr= (void**)arg;
|
||||
av_free(*ptr);
|
||||
*ptr = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user