mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
player/loadfile: enable streams in order of types when loading file
The previous commit to avoid refresh seeking video streams has an edge case when enabling tracks when loading files. Since the streams are initially unselected and then multiple streams are enabled, the detection only works reliably when video tracks are enabled first. This makes sure that loading file enables tracks in a predictable order.
This commit is contained in:
parent
33e414fa5d
commit
b09e48e388
@ -1724,8 +1724,10 @@ static void play_current_file(struct MPContext *mpctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int n = 0; n < mpctx->num_tracks; n++)
|
for (int t = 0; t < STREAM_TYPE_COUNT; t++)
|
||||||
reselect_demux_stream(mpctx, mpctx->tracks[n], false);
|
for (int n = 0; n < mpctx->num_tracks; n++)
|
||||||
|
if (mpctx->tracks[n]->type == t)
|
||||||
|
reselect_demux_stream(mpctx, mpctx->tracks[n], false);
|
||||||
|
|
||||||
update_demuxer_properties(mpctx);
|
update_demuxer_properties(mpctx);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user