diff options
author | Burkhard Plaum <plaum@ipf.uni-stuttgart.de> | 2005-08-21 19:50:22 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-08-21 19:50:22 +0000 |
commit | 32fbf33e61ed13c728e4efcbd8729171391c472f (patch) | |
tree | 864cb02557b1aed9a375b7d8a94e6679ec3921fd | |
parent | 1cd89f276a0be52609904ea911a93cec78c92294 (diff) | |
download | ffmpeg-32fbf33e61ed13c728e4efcbd8729171391c472f.tar.gz |
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
-rw-r--r-- | libavcodec/utils.c | 11 |
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 */ |