[MPlayer-cvslog] CVS: main/loader win32.c,1.103,1.104
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Mon Oct 3 21:11:57 CEST 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/loader
In directory mail:/var2/tmp/cvs-serv30958
Modified Files:
win32.c
Log Message:
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).
Index: win32.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/win32.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- win32.c 2 Oct 2005 14:26:41 -0000 1.103
+++ win32.c 3 Oct 2005 19:11:55 -0000 1.104
@@ -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);
}
More information about the MPlayer-cvslog
mailing list