mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 08:12:17 +00:00
demux_mkv: for subtitle preroll, consider all clusters
This considered only index entries that were for the same track ID as the track used for seeking. This doesn't make much sense for preroll; it'll just possibly skip clusters, and select an earlier cluster. One possible negative side-effect is that the preroll might be too tight now, and miss subtitle packets more often.
This commit is contained in:
parent
6ab364df4b
commit
24e52f6643
@ -2716,11 +2716,9 @@ static struct mkv_index *seek_with_cues(struct demuxer *demuxer, int seek_id,
|
||||
if (flags & SEEK_SUBPREROLL) {
|
||||
uint64_t prev_target = 0;
|
||||
for (size_t i = 0; i < mkv_d->num_indexes; i++) {
|
||||
if (seek_id < 0 || mkv_d->indexes[i].tnum == seek_id) {
|
||||
uint64_t index_pos = mkv_d->indexes[i].filepos;
|
||||
if (index_pos > prev_target && index_pos < seek_pos)
|
||||
prev_target = index_pos;
|
||||
}
|
||||
uint64_t index_pos = mkv_d->indexes[i].filepos;
|
||||
if (index_pos > prev_target && index_pos < seek_pos)
|
||||
prev_target = index_pos;
|
||||
}
|
||||
if (mkv_d->index_has_durations) {
|
||||
// If there are no earlier subtitles overlapping with the
|
||||
|
Loading…
Reference in New Issue
Block a user