summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorBurkhard Plaum <plaum@ipf.uni-stuttgart.de>2005-08-21 19:50:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-08-21 19:50:22 +0000
commit32fbf33e61ed13c728e4efcbd8729171391c472f (patch)
tree864cb02557b1aed9a375b7d8a94e6679ec3921fd /libavcodec/utils.c
parent1cd89f276a0be52609904ea911a93cec78c92294 (diff)
Call av_free_static automatically before DLL unload patch by (plaum:ipf uni-stuttgart de)
Originally committed as revision 4532 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 1b2cd21645..f2a8ae0001 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -144,6 +144,17 @@ void av_free_static(void)
}
/**
+ * Call av_free_static automatically before it's too late
+ */
+
+static void do_free() __attribute__ ((destructor));
+
+static void do_free()
+{
+ av_free_static();
+}
+
+/**
* Frees memory and sets the pointer to NULL.
* @param arg pointer to the pointer which should be freed
*/