aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-03-03 01:57:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-03-03 01:57:43 +0000
commit81c5f887485a3d46ec5948832acc7da8167b5248 (patch)
treeb1129259d5ab578f1ffc7bc1e6d5d94bf0f19269 /libavcodec/utils.c
parent461cd5bfb5c38e48a81b4a9a5912dfd65da1ba3d (diff)
downloadffmpeg-81c5f887485a3d46ec5948832acc7da8167b5248.tar.gz
macrofree av_freep()
Originally committed as revision 2839 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7227e4f507..9fadfcd969 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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;
}