# HG changeset patch # User reimar # Date 1128366715 0 # Node ID 831cdc896c4cc19a519fc2951bc112a22eff4ff4 # Parent e1d6fbd607e0ff45579568557aacf15a21175ec8 expGetSystemInfo should not leave SYSTEM_INFO unitialized, even when /proc/cpuinfo is unreadable. Fixes some weird behaviour with the wmv decoder (it tries multithreaded decode). diff -r e1d6fbd607e0 -r 831cdc896c4c loader/win32.c --- a/loader/win32.c Mon Oct 03 14:29:01 2005 +0000 +++ b/loader/win32.c Mon Oct 03 19:11:55 2005 +0000 @@ -938,9 +938,7 @@ dbgprintf("GetSystemInfo(%p) =>\n", si); if (cache) { - memcpy(si,&cachedsi,sizeof(*si)); - DumpSystemInfo(si); - return; + goto exit; } memset(PF,0,sizeof(PF)); pf_set = 1; @@ -1036,7 +1034,14 @@ FILE *f = fopen ("/proc/cpuinfo", "r"); if (!f) - return; + { +#ifdef MPLAYER + mp_msg(MSGT_WIN32, MSGL_WARN, "expGetSystemInfo: " + "/proc/cpuinfo not readable! " + "Expect bad performance and/or weird behaviour\n"); +#endif + goto exit; + } while (fgets(line,200,f)!=NULL) { char *s,*value; @@ -1162,6 +1167,7 @@ } #endif /* __linux__ */ cache = 1; +exit: memcpy(si,&cachedsi,sizeof(*si)); DumpSystemInfo(si); }