mirror of https://github.com/mpv-player/mpv
demux: fix seek range update after head packets are pruned
The seek range update was to early and did not take the removed head packets into account. And therefore missed that the queue was not BOF anymore. This led to not be able to backward seek before the first packet of the first seek range. Fix it by moving the seek range update after the possible removal and the change of the BOF flag. Fixes: #6522
This commit is contained in:
parent
d38c4879d7
commit
b275232141
|
@ -1569,8 +1569,6 @@ static void prune_old_packets(struct demux_internal *in)
|
|||
}
|
||||
prev = prev->next;
|
||||
}
|
||||
|
||||
update_seek_ranges(range);
|
||||
}
|
||||
|
||||
bool done = false;
|
||||
|
@ -1579,6 +1577,8 @@ static void prune_old_packets(struct demux_internal *in)
|
|||
remove_head_packet(queue);
|
||||
}
|
||||
|
||||
update_seek_ranges(range);
|
||||
|
||||
if (range != in->current_range && range->seek_start == MP_NOPTS_VALUE)
|
||||
free_empty_cached_ranges(in);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue