Mercurial > libavcodec.hg
diff utils.c @ 2840:22eec5a1b043 libavcodec
Call av_free_static automatically before DLL unload patch by (plaum:ipf uni-stuttgart de)
author | michael |
---|---|
date | Sun, 21 Aug 2005 19:50:22 +0000 |
parents | b128802eb77b |
children | 6f7428adc6ad |
line wrap: on
line diff
--- 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 */