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.
This commit is contained in:
Kacper Michajłow
2026-08-24 03:17:07 +02:00
parent b3e3d1774e
commit daaab42166
+5
View File
@@ -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) &&