mirror of
https://github.com/mpv-player/mpv
synced 2025-03-21 02:41:13 +00:00
demux: fix minor seek_preroll consistency issue
When packet appending sets the start of the range, it adjusts the range by seek_preroll. Do this when packets are pruned from the start of the range too. (Yeah, seek_preroll handling is probably broken in some other cases. It was halfhearted to begin with.)
This commit is contained in:
parent
0f6cda4ab1
commit
73a48ff47b
@ -2185,6 +2185,8 @@ static void prune_old_packets(struct demux_internal *in)
|
|||||||
queue->seek_start = kf_min;
|
queue->seek_start = kf_min;
|
||||||
|
|
||||||
if (queue->seek_start != MP_NOPTS_VALUE) {
|
if (queue->seek_start != MP_NOPTS_VALUE) {
|
||||||
|
queue->seek_start += ds->sh->seek_preroll;
|
||||||
|
|
||||||
// Don't need to update if the new start is still before the
|
// Don't need to update if the new start is still before the
|
||||||
// range's start (or if the range was undefined anyway).
|
// range's start (or if the range was undefined anyway).
|
||||||
if (range->seek_start == MP_NOPTS_VALUE ||
|
if (range->seek_start == MP_NOPTS_VALUE ||
|
||||||
|
Loading…
Reference in New Issue
Block a user