summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-16 13:45:43 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:10 +0900
commitd8455f34c13a002a01c9b3a9e356a98edfececeb (patch)
tree4a446b32f89b3d8d3f2cd5eb1e6a3f0170f739c6 /video
parentb0877e54541427402ec6d748bcc67011361c9be6 (diff)
downloadmpv-d8455f34c13a002a01c9b3a9e356a98edfececeb.tar.bz2
mpv-d8455f34c13a002a01c9b3a9e356a98edfececeb.tar.xz
player: respect --untimed on last frame
The last video frame is another case that has a separate code path, although it's pretty similar to the one in commit 73e5aa87. Fix this in a different way, which also takes care of the last frame case, although without context the code becomes slightly more tricky. As further cleanup, move the decision about framedropping itself to the same place, so the check in vo.c becomes much simpler. The check for the vo->driver->encode flag, which is remvoed completely, was redundant too. Fixes #1480.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index 7e2bcfb83e..9c5514ee4f 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -561,8 +561,7 @@ static bool render_frame(struct vo *vo)
int64_t next_vsync = prev_sync(vo, mp_time_us()) + in->vsync_interval;
int64_t end_time = pts + duration;
- if (!(vo->global->opts->frame_dropping & 1) || !in->hasframe_rendered ||
- vo->driver->untimed || vo->driver->encode)
+ if (!in->hasframe_rendered)
duration = -1; // disable framedrop
in->dropped_frame = duration >= 0 && end_time < next_vsync;