# HG changeset patch # User michael # Date 1124653822 0 # Node ID 22eec5a1b043c8513cd41cc6173d7688f6854cb8 # Parent b857807dfe3082f52623b21741d88c55e12273b9 Call av_free_static automatically before DLL unload patch by (plaum:ipf uni-stuttgart de) diff -r b857807dfe30 -r 22eec5a1b043 utils.c --- a/utils.c Sun Aug 21 15:44:59 2005 +0000 +++ b/utils.c Sun Aug 21 19:50:22 2005 +0000 @@ -144,6 +144,17 @@ } /** + * 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 */