From daaab42166c4e7597ab02518f3a7e1e93d296172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 24 Aug 2026 03:17:07 +0200 Subject: [PATCH] player: rejoin the restart for a video frame after a transient EOF A sparse video stream can report a transient EOF during a restart. The DVD-Audio still track is read lazily and its first frame may arrive a moment after the video chain already drained. Treat a frame arriving while the restart is in progress as the restart's first frame. --- player/video.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/player/video.c b/player/video.c index 68300729af..60430224d1 100644 --- a/player/video.c +++ b/player/video.c @@ -1072,6 +1072,11 @@ void write_video(struct MPContext *mpctx) if (r < 0) goto error; + // A frame arriving while the restart is still in progress is the + // restart's first frame, even if the (sparse) stream was at EOF. + if (r == VD_NEW_FRAME && mpctx->video_status == STATUS_EOF && !mpctx->restart_complete) + mpctx->video_status = STATUS_SYNCING; + if (r == VD_WAIT) { // Heuristic to detect underruns. if (mpctx->video_status == STATUS_PLAYING && !vo_still_displaying(vo) &&