1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 01:52:19 +00:00

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
This commit is contained in:
reimar 2005-10-03 19:11:55 +00:00
parent 21f2437d9b
commit 00e3391bae

View File

@ -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);
}