From 751830da32ae2645d9f9f7b9704891b12ea99123 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 26 Jan 2015 12:06:45 +0100 Subject: 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. --- video/out/vo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out') 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; -- cgit v1.2.3