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.
This commit is contained in:
wm4
2015-01-26 12:06:45 +01:00
parent 9b8d3acc8b
commit 751830da32

View File

@@ -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;