summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-28 18:41:11 +0100
committerwm4 <wm4@nowhere>2015-11-28 18:41:11 +0100
commit73e0d545ceb4979c5d271eb2b86b4e4bdf4b69e9 (patch)
tree7447fe0fd5be8b52833de1dad842c7ef6cab6ceb
parent50d43a1db4577965ef9123bbefc72fb8194181b3 (diff)
downloadmpv-73e0d545ceb4979c5d271eb2b86b4e4bdf4b69e9.tar.bz2
mpv-73e0d545ceb4979c5d271eb2b86b4e4bdf4b69e9.tar.xz
vo: report when switching back to system-reported FPS too
Instead of just when switching away from it. Further improvement over commit 41f2c653.
-rw-r--r--video/out/vo.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index a9071ef221..06b943f1a5 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -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;