1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-18 13:47:04 +00:00

vo: report when switching back to system-reported FPS too

Instead of just when switching away from it.

Further improvement over commit 41f2c653.
This commit is contained in:
wm4 2015-11-28 18:41:11 +01:00
parent 50d43a1db4
commit 73e0d545ce

View File

@ -392,10 +392,17 @@ static void update_vsync_timing_after_swap(struct vo *vo)
if (mjitter * 1.01 < njitter)
use_estimated = true;
}
if (use_estimated && in->vsync_interval == in->nominal_vsync_interval) {
MP_WARN(vo, "Reported display FPS seems incorrect.\n"
"Assuming a value closer to %.3f Hz.\n",
1e6 / in->estimated_vsync_interval);
if (use_estimated == (in->vsync_interval == in->nominal_vsync_interval)) {
if (use_estimated) {
MP_WARN(vo, "Reported display FPS seems incorrect.\n"
"Assuming a value closer to %.3f Hz.\n",
1e6 / in->estimated_vsync_interval);
in->vsync_interval = in->estimated_vsync_interval;
} else {
MP_WARN(vo, "Switching back to assuming %.3f Hz.\n",
1e6 / in->nominal_vsync_interval);
in->vsync_interval = in->nominal_vsync_interval;
}
}
in->vsync_interval = use_estimated ? (int64_t)in->estimated_vsync_interval
: in->nominal_vsync_interval;