diff utils.c @ 1854:73ee15c391bf libavcodec

macrofree av_freep()
author michael
date Wed, 03 Mar 2004 01:57:43 +0000
parents cd2d7fcfab7a
children bafde44145f9
line wrap: on
line diff
--- a/utils.c	Tue Mar 02 18:39:25 2004 +0000
+++ b/utils.c	Wed Mar 03 01:57:43 2004 +0000
@@ -103,9 +103,13 @@
     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;
 }