Mercurial > mplayer.hg
changeset 16650:831cdc896c4c
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).
author | reimar |
---|---|
date | Mon, 03 Oct 2005 19:11:55 +0000 |
parents | e1d6fbd607e0 |
children | 6e45efe0e619 |
files | loader/win32.c |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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); }