summaryrefslogtreecommitdiffstats
path: root/demux/demux_mkv.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-05 21:50:20 +0100
committerwm4 <wm4@nowhere>2014-11-05 21:54:28 +0100
commit24e52f664337d6d27cea7a76a456a0df626fd45f (patch)
treeef3891bdf75387e35dbe9ad9a86271f41e60779d /demux/demux_mkv.c
parent6ab364df4b2a80b53f46d5ba3bd46a5557c90f5a (diff)
downloadmpv-24e52f664337d6d27cea7a76a456a0df626fd45f.tar.bz2
mpv-24e52f664337d6d27cea7a76a456a0df626fd45f.tar.xz
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.
Diffstat (limited to 'demux/demux_mkv.c')
-rw-r--r--demux/demux_mkv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 417ac1ba38..ee1693ee58 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -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