1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-29 02:22:19 +00:00

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:
Gunnar Marten 2019-02-28 21:48:51 +01:00 committed by Jan Ekström
parent d38c4879d7
commit b275232141

View File

@ -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);
}