[MPlayer-dev-eng] [PATCH] Better handling of win32 GUI thread
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Nov 1 11:24:57 CET 2007
Hello,
On Thu, Nov 01, 2007 at 05:37:59PM +0800, Zuxy Meng wrote:
> @@ -459,7 +459,7 @@
> if(sub_window) ShowWindow(mygui->subwindow, SW_SHOW);
> }
>
> -static DWORD WINAPI GuiThread(void)
> +static unsigned __stdcall GuiThread(void* param)
> {
> MSG msg;
>
> @@ -486,12 +486,12 @@
>
> void guiInit(void)
> {
> - DWORD threadId;
> + unsigned threadId;
Why? WINAPI is exactly the same as __stdcall (and WINAPI is used more
often in MPlayer IIRC). But actually the docs I found say that it must
be __cdecl.
While DWORD is unfortunately unsigned long, it does not matter at least
as long as we aren't able to build 64 bit windows binaries, so this
seems like a at most cosmetic change to me as well.
And isn't there a sane way to avoid the leak and still use the more
standard CreateThread?
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list