From d8455f34c13a002a01c9b3a9e356a98edfececeb Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 16 Jan 2015 13:45:43 +0100 Subject: 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. --- video/out/vo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'video/out') 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; -- cgit v1.2.3