mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 00:47:00 +01:00
Resuming loaded the file from the start and sought on FileLoaded. By then mpv's demuxer had begun reading ahead from the beginning, so the blocks the seek wanted queued behind ones fetched to be thrown away. Player::play_from sets mpv's start option instead, and puts it back once the file has loaded. VideoStream::warm_resume fetches, beside the two edge blocks, the block the resume position falls in, estimated from the running time saved with the watch state. A video's bitrate is uneven, so it can land a block off; then it is one block for nothing, against a round trip saved when it lands.