aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2002-05-20 16:23:27 +0000
committerFabrice Bellard <fabrice@bellard.org>2002-05-20 16:23:27 +0000
commit4d7a0a0593918fc054065f7b545edef2d2981048 (patch)
treed4e9dbce8d4d08df94c20f8e1fe9497d3bcd97dc /libavcodec/utils.c
parent51a4966370801e11e1a6b8c0de7c7d774d97503d (diff)
downloadffmpeg-4d7a0a0593918fc054065f7b545edef2d2981048.tar.gz
better av_freep()
Originally committed as revision 541 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index cf94531760..43e39ebc93 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -65,6 +65,13 @@ void av_free(void *ptr)
free(ptr);
}
+/* cannot call it directly because of 'void **' casting is not automatic */
+void __av_freep(void **ptr)
+{
+ av_free(*ptr);
+ *ptr = NULL;
+}
+
/* encoder management */
AVCodec *first_avcodec;