CPU (BSD): fix max freq detection

This commit is contained in:
Carter Li
2024-05-18 01:50:21 +08:00
parent fd16e69464
commit b79c47cac9
+2
View File
@@ -66,6 +66,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
}
ffStrbufClear(&buffer);
}
cpu->frequencyMin /= 1000;
cpu->frequencyMax /= 1000;
int clockRate = ffSysctlGetInt("hw.clockrate", 0);
cpu->frequencyBase = clockRate <= 0 ? 0.0/0.0 : clockRate / 1000.0;