mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-16 22:40:53 +08:00
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:
@@ -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) &&
|
||||
|
||||
Reference in New Issue
Block a user