From 081368dabf70b7cf751a8e4058f68e9c03935b6d Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 19 Jan 2015 18:00:41 +0100 Subject: video: fix waiting for last frame/format reconfig We still need to send the VO a duration in these cases. Disabling framedrop has logically absolutely nothing to do with these cases; it was overlooked in commit 918b06c4. So we always send the frame duration (or a guess for it), and check whether framedropping is actually enabled in the VO code. (It would be cleaner to send framedrop as a flag, but I don't care about that right now.) --- player/video.c | 2 +- video/out/vo.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/player/video.c b/player/video.c index fd8df9cead..7e3a067085 100644 --- a/player/video.c +++ b/player/video.c @@ -809,7 +809,7 @@ void write_video(struct MPContext *mpctx, double endpts) diff = vpts1 - vpts0; if (diff < 0 && mpctx->d_video->fps > 0) diff = 1.0 / mpctx->d_video->fps; // fallback to demuxer-reported fps - if (opts->untimed || vo->driver->untimed || !(opts->frame_dropping & 1)) + if (opts->untimed || vo->driver->untimed) diff = -1; // disable frame dropping and aspects of frame timing if (diff >= 0) { // expected A/V sync correction is ignored diff --git a/video/out/vo.c b/video/out/vo.c index 9c5514ee4f..7c0fce8e55 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -566,6 +566,7 @@ static bool render_frame(struct vo *vo) in->dropped_frame = duration >= 0 && end_time < next_vsync; in->dropped_frame &= !(vo->driver->caps & VO_CAP_FRAMEDROP); + in->dropped_frame &= !(vo->global->opts->frame_dropping & 1); // Even if we're hopelessly behind, rather degrade to 10 FPS playback, // instead of just freezing the display forever. in->dropped_frame &= mp_time_us() - in->last_flip < 100 * 1000; -- cgit v1.2.3