[MPlayer-cygwin] patch for mplayer under win9x

Sergey sergemp at mail.ru
Tue Feb 13 01:00:43 CET 2007


Hello, mplayer-cygwin.

  Without this patch mplayer Gui does not start under win9x.
It hangs with message:
    [GUI] Creating GUI Thread 0x0000
It's because under win9x last param of CreateThread() cannot be NULL.
It must point somewhere.
  Patch can be something like:

--- 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 dummy;
     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, &dummy));

     /* Wait until the gui is created */
     while(!mygui) Sleep(100);
****** end of patch

PS:
  And one more small patch for cpuinfo tool to strip leading spaces
  from processor name.
  Similar patch was applied in rev.18539 to mplayer/cpudetect.c.
  But mplayer/TOOLS/cpuinfo.c was missed.
  
--- mplayer/TOOLS/cpuinfo.c       Sun Jul 30 00:47:24 2006
+++ mplayer.my/TOOLS/cpuinfo.c   Sun Jul 30 03:54:14 2006
@@ -141,6 +141,10 @@
       }
       processor_name[48] = 0;
       model_name = processor_name;
+      while (*model_name == ' ') {
+        model_name++;
+      }
     }
   } else {
     amd_flags = 0;
****** end of patch

-- 
  Sergey




More information about the MPlayer-cygwin mailing list