mirror of
https://github.com/mpv-player/mpv
synced 2024-11-14 22:48:35 +01:00
demux_timeline: always signal new segment after a seek
This is needed to put the decoders into the correct state. In particular, decoders will not initialize the current segment without this flag. The intention of not setting the flag for seeks within the segments were to avoid costly decoder reinits, but it seems this is better handled explicitly in the decoder wrappers.
This commit is contained in:
parent
adf65634d8
commit
b787a4121a
@ -93,7 +93,6 @@ static void switch_segment(struct demuxer *demuxer, struct segment *new,
|
||||
double start_pts, int flags)
|
||||
{
|
||||
struct priv *p = demuxer->priv;
|
||||
bool new_segment = p->current != new;
|
||||
|
||||
if (!(flags & (SEEK_FORWARD | SEEK_BACKWARD)))
|
||||
flags |= SEEK_BACKWARD | SEEK_HR;
|
||||
@ -107,8 +106,7 @@ static void switch_segment(struct demuxer *demuxer, struct segment *new,
|
||||
|
||||
for (int n = 0; n < p->num_streams; n++) {
|
||||
struct virtual_stream *vs = &p->streams[n];
|
||||
if (new_segment)
|
||||
vs->new_segment = true;
|
||||
vs->new_segment = true;
|
||||
vs->eos_packets = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user