summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-23 12:00:16 +0100
committerwm4 <wm4@nowhere>2015-01-23 12:21:45 +0100
commita96c3ac90e73c51ace0ee7a65439c71327057df1 (patch)
treee27c2864842f99b8fb4531f07e6596406516258a /video/out
parent55cdc734c513f4aa618b7c3938814583ce7300b1 (diff)
downloadmpv-a96c3ac90e73c51ace0ee7a65439c71327057df1.tar.bz2
mpv-a96c3ac90e73c51ace0ee7a65439c71327057df1.tar.xz
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.)
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index cbab1ac5b1..afc963e8fd 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -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;