[MPlayer-dev-eng] [PATCH] Better handling of win32 GUI thread

Zuxy Meng zuxy.meng at gmail.com
Thu Nov 1 10:37:59 CET 2007


Hi,

The attached patch contains two fixes:

1. Use _beginthreadex instead of CreateThread to create the thread so
as to avoid a small memory leak when mplayer is linked to MS CRT.

2. Remove the call to TerminateThread(). For one thing this isn't the
recommended way to terminate a thread; for another it's called with an
incorrect argument and therefore has always failed: the first
parameter should be a handle to the thread instead of the thread
function. And without this call the GUI thread will terminate itself
anyway once mygui == NULL.

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: interface.c.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071101/10a41402/attachment.txt>


More information about the MPlayer-dev-eng mailing list