summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-26 12:06:45 +0100
committerwm4 <wm4@nowhere>2015-01-26 12:06:45 +0100
commit751830da32ae2645d9f9f7b9704891b12ea99123 (patch)
tree51362779a1e61208eac328d3f6df76ae0fcf70bb
parent9b8d3acc8b95771de2f2be2d687290f71979e458 (diff)
downloadmpv-751830da32ae2645d9f9f7b9704891b12ea99123.tar.bz2
mpv-751830da32ae2645d9f9f7b9704891b12ea99123.tar.xz
vo: handle very long frame durations with smoothmotion enabled
With mf://, rather long frame durations are common. By default, one frame takes 1 second. This causes the if branch changed with this commit to always being taken, which in turn leads to the player not being woken up correctly. (As a consequence, it "freezes" by waiting for events that never come, and moving the mouse cursor over the window will wake it up again and advance video.) Obviously, the code should account for how long the video frame takes. The code is probably still not fully correct, but for now this fixes the issue at hand. Fixes #1521.
-rw-r--r--video/out/vo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index 5bb28bef54..54f0a92d39 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -596,7 +596,7 @@ static bool render_frame(struct vo *vo)
// framedrop is enabled. Also, if the frame is to be dropped, even
// though it's an interpolated frame (img==NULL), exit early.
if (!img && ((in->hasframe_rendered &&
- prev_vsync > pts + in->vsync_interval_approx)
+ prev_vsync > pts + duration + in->vsync_interval_approx)
|| in->dropped_frame))
{
in->dropped_frame = false;