<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
On MS Windows libgoom_plugin.dll, when enabled, generates a 2.5meg memleak
when a track playback ends. Problem is visible
on VLC 0.9.x right through to current git master.<br><br>Here is a
patch for vlc/modules/visualization/goom.c which works around the the
failings of libgoom2k4 ability to free its resources.<br>Instead of creating a new instance of libgoom2k4 on each track start, with this patch a single instance will be used throughout.<br><br><br>--- goom.c 2009-06-10 17:21:22.000000000 +0100<br>+++ mod_goom.c 2009-06-10 18:07:11.796875000 +0100<br>@@ -90,6 +90,10 @@<br> *****************************************************************************/<br> #define MAX_BLOCKS 100<br> #define GOOM_DELAY 400000<br>+<br>+#ifdef WIN32<br>+static PluginInfo *p_plugin_info;<br>+#endif<br> <br> typedef struct<br> {<br>@@ -326,7 +330,9 @@<br> audio_date_t i_pts;<br> int16_t p_data[2][512];<br> int i_data = 0, i_count = 0;<br>- PluginInfo *p_plugin_info;<br>+#ifndef WIN32<br>+ PluginInfo *p_plugin_info;<br>+#endif<br> int canc = vlc_savecancel ();<br> <br> width = var_GetInteger( p_this, "goom-width" );<br>@@ -335,8 +341,12 @@<br> speed = var_CreateGetInteger( p_thread, "goom-speed" );<br> speed = MAX_SPEED - speed;<br> if( speed < 0 ) speed = 0;<br>-<br>- p_plugin_info = goom_init( width, height );<br>+<br>+#ifdef WIN32<br>+ goom_set_resolution(p_plugin_info, width, height);<br>+#else<br>+ p_plugin_info = goom_init( width, height );<br>+#endif<br> <br> while( vlc_object_alive (p_thread) )<br> {<br>@@ -375,8 +385,9 @@<br> p_pic->date = aout_DateGet( &i_pts ) + GOOM_DELAY;<br> vout_DisplayPicture( p_thread->p_vout, p_pic );<br> }<br>-<br>+#ifndef WIN32<br> goom_close( p_plugin_info );<br>+#endif<br> vlc_restorecancel (canc);<br> return NULL;<br> }<br>@@ -448,3 +459,23 @@<br> <br> return psz_title;<br> }<br>+<br>+#ifdef WIN32<br>+BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);<br>+<br>+BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)<br>+{<br>+ (void)hinstDLL;<br>+ (void)lpvReserved;<br>+ <br>+ if ( fdwReason == DLL_PROCESS_ATTACH )<br>+ {<br>+ p_plugin_info = goom_init(320, 240);<br>+ }<br>+ else if ( fdwReason == DLL_PROCESS_DETACH )<br>+ {<br>+ goom_close(p_plugin_info);<br>+ }<br>+ return 1;<br>+}<br>+#endif<br><br><br /><hr />
Upgrade to Internet Explorer 8 Optimised for MSN. <a href='http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U' target='_new'>Download Now</a></body>
</html>