summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-03 19:11:55 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-03 19:11:55 +0000
commit00e3391bae63beb1644db3a450569dfb256fe40c (patch)
tree3830946dfe402033408120f709502029becd262b /loader
parent21f2437d9beea8b2a5e6234d278c92c7be397d9c (diff)
downloadmpv-00e3391bae63beb1644db3a450569dfb256fe40c.tar.bz2
mpv-00e3391bae63beb1644db3a450569dfb256fe40c.tar.xz
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). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16651 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r--loader/win32.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/loader/win32.c b/loader/win32.c
index 55524a5efe..3a507f148a 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -938,9 +938,7 @@ static void WINAPI expGetSystemInfo(SYSTEM_INFO* si)
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 @@ static void WINAPI expGetSystemInfo(SYSTEM_INFO* si)
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 @@ static void WINAPI expGetSystemInfo(SYSTEM_INFO* si)
}
#endif /* __linux__ */
cache = 1;
+exit:
memcpy(si,&cachedsi,sizeof(*si));
DumpSystemInfo(si);
}