summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c
index 5db76db3fd..693454ecb0 100644
--- a/player/video.c
+++ b/player/video.c
@@ -1017,7 +1017,11 @@ void write_video(struct MPContext *mpctx)
mpctx->time_frame = 0;
}
- if (mpctx->video_status == STATUS_DRAINING) {
+ // Wait for the VO to signal actual EOF, then exit if the frame timer
+ // has expired.
+ if (mpctx->video_status == STATUS_DRAINING &&
+ vo_is_ready_for_frame(vo, -1))
+ {
mpctx->time_frame -= get_relative_time(mpctx);
mp_set_timeout(mpctx, mpctx->time_frame);
if (mpctx->time_frame <= 0) {