[MPlayer-cygwin] What about CreateThread patch?

Erik Lunchpail erik_27can at yahoo.com
Tue Apr 3 17:59:37 CEST 2007


--- Sergey <sergemp at mail.ru> wrote:

> Hello, mplayer-cygwin.
> 
>   What about this patch for win32 GUI? Without this patch mplayer GUI
> does not start at least under Win98 SE (tested on two win98 machines,
> can also check on several WinME).
>   With this patch applied GUI works.
> 
>   From MSDN: http://msdn2.microsoft.com/en-us/library/ms682453.aspx
>     lpThreadId
>     [out] A pointer to a variable that receives the thread
> identifier.
>     If this parameter is NULL, the thread identifier is not returned.
>     Windows Me/98/95:  This parameter may not be NULL.
> 
> --- mplayer/Gui/win32/interface.c   Sat Oct 14 03:31:58 2006
> +++ mplayer.my/Gui/win32/interface.c    Mon Nov  6 02:34:08 2006
> @@ -453,11 +453,12 @@
> 
>  void guiInit(void)
>  {
> +    DWORD threadId; // required for CreateThread under win9x/ME
>      memset(&guiIntfStruct, 0, sizeof(guiIntfStruct));
>      /* Create The gui thread */
>      if (!mygui)
>          mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Creating GUI Thread
> 0x%04x\n",
> -              (int) CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)
> GuiThread, NULL, 0, NULL));
> +              (int) CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)
> GuiThread, NULL, 0, &threadId));
> 
>      /* Wait until the gui is created */
>      while(!mygui) Sleep(100);
> ****** end of patch

Thx, fix applied.



More information about the MPlayer-cygwin mailing list