<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<i><span class="code-comment">Hello Gildas,<br>
<br>
I am writting you as you appear as the main developer of the file
directx.c in the application VLC.<br>
<br>
There is a little "bug" in this file (lines 860-862):<br>
<br>
</span></i><tt> <i><span class="code-comment">/* set the colorkey as
the backgound brush for the video window */</span></i> <a
href="http://trac.videolan.org/vlc/browser/trunk/modules/video_output/directx/directx.c#L861"></a>
<br>
SetClassLong( p_vout->p_sys->hvideownd, GCL_HBRBACKGROUND,
<br>
(LONG)CreateSolidBrush( p_vout->p_sys->i_rgb_colorkey ) );</tt><br>
<i><span class="code-comment"><br>
In this command, </span></i>CreateSolidBrush is called inside of
another function and the pointer to the brush is lost. <br>
Due to that, each time that the function is called, a GDI object
remains in memory. <br>
<br>
If you want destroy the brush object, you can divide this sentence as
follows:<br>
<br>
1. Add an attribute of type brush in the struct vout_sys_t<br>
File: modules/video_output/directx/vout.h<b><br>
<tt> HBRUSH brush;</tt><br>
</b><br>
2. Divide actual command: <br>
<br>
<tt> /* Create the actual brush */<br>
<b> p_vout->p_sys->brush = CreateSolidBrush(
p_vout->p_sys->i_rgb_colorkey );<br>
</b><br>
SetClassLong( p_vout->p_sys->hvideownd, GCL_HBRBACKGROUND,<br>
<b>(LONG)p_vout->p_sys->brush</b> );</tt><br>
<i><span class="code-comment"><br>
<br>
<br>
3. Delete de brush object in the function DirectXCloseDisplay:<br>
<br>
<tt> static void DirectXCloseDisplay( vout_thread_t *p_vout )<br>
{<br>
msg_Dbg( p_vout, "DirectXCloseDisplay" );<br>
<br>
<b> if( p_vout->p_sys->brush != NULL )<br>
{<br>
DeleteObject( p_vout->p_sys->brush);<br>
}<br>
</b><br>
[ .... ]<br>
</tt><br>
<br>
I hope this message helps you to correct the file. Kind Regards,<br>
</span></i>
<pre class="moz-signature" cols="72">--
''~``
( o o )
+------------.oooO--(_)--Oooo.-------------+
| |
| Javier Martínez Nohalés |
| Departamento de Comunicaciones |
| Universidad Politécnica de Valencia |
| Tel: 963877000 Ext:73004 |
| .oooO |
| ( ) Oooo. |
+--------------\ (----( )----------------+
\_) ) /
(_/
</pre>
</body>
</html>