vo: allow dropping additional frames with smoothmotion

The logic disabled framedropping if the frame was interpolated (i.e. the
render call is only done to interpolate between the previous frame, and
the frame before that).

It seems doing this wasn't even necessary, and broke framedrop in
smoothmotion mode. In fact, this code did nothing for display with video
fps below display fps. It did prevent the framedrop counter from going
up, though. So change it so that dropped interpolated frames are never
reported. (Doing so can give confusing results, such as dropping 1000s
of frames on slow operations like video start or changing filters.)
This commit is contained in:
wm4 2015-01-23 12:00:16 +01:00
parent 55cdc734c5
commit a96c3ac90e
1 changed files with 6 additions and 6 deletions

View File

@ -579,17 +579,17 @@ static bool render_frame(struct vo *vo)
in->dropped_frame &= mp_time_us() - in->last_flip < 100 * 1000;
if (in->vsync_timed) {
in->dropped_frame &= !!img;
// this is a heuristic that wakes the thread up some
// time before the next vsync
target = next_vsync - MPMIN(in->vsync_interval / 3, 4e3);
// we are very late with the frame and using vsync timing: probably
// We are very late with the frame and using vsync timing: probably
// no new frames are coming in. This must be done whether or not
// framedrop is enabled.
if (!img && in->hasframe_rendered &&
prev_vsync > pts + in->vsync_interval_approx)
// 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)
|| in->dropped_frame))
{
in->dropped_frame = false;
in->rendering = false;