mirror of
https://github.com/mpv-player/mpv
synced 2025-01-14 02:51:26 +00:00
demux: force reading packets again after seeks
in->eof is used as an indicator whether reading packets still makes sense. (Without this, the prefetcher would obviously burn CPU by retrying reading even though everything has been read.) This was not reset properly after seeks were performed. It led to getting stuck in at least one corner case: when enabling a track, the demuxer would seek backwards to get new packets from the current playback position ("refresh seeks"). But if playback was paused, and EOF was previously reached, it would not try to read packers again due to in->eof being false. There was not anything else that would make it retry reading, so it was stuck in a weird underrun/buffering state. Fixes: #6986
This commit is contained in:
parent
d2a9e3fb34
commit
68ce36a2db
@ -2347,7 +2347,7 @@ static void execute_seek(struct demux_internal *in)
|
||||
{
|
||||
int flags = in->seek_flags;
|
||||
double pts = in->seek_pts;
|
||||
in->last_eof = false;
|
||||
in->last_eof = in->eof = false;
|
||||
in->seeking = false;
|
||||
in->seeking_in_progress = pts;
|
||||
in->demux_ts = MP_NOPTS_VALUE;
|
||||
|
Loading…
Reference in New Issue
Block a user