aboutsummaryrefslogtreecommitdiffhomepage
path: root/demux
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-11-05 20:42:20 +0100
committerGravatar wm4 <wm4@nowhere>2014-11-05 21:51:43 +0100
commit8f992515cddda2ac4687047b66ef780d77abf8aa (patch)
tree288c66cd28088fb04c52bbd646e319b66910c4a7 /demux
parentea613c2592e99ebb9f9bf3f374465b26a077b4cf (diff)
demux_mkv: index all packets
Instead of indexing only 1 packet per cluster (which is enough for working seeking), add every packet to the index. Since on seek, we go through every single index entry, this probably makes seeking slower. On the other hand, this code is used for files without index only (e.g. incomplete files), so it probably doesn't matter much. Preparation for the following commits.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_mkv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index a9230106f5..5ececb9edc 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -678,10 +678,8 @@ static void add_block_position(demuxer_t *demuxer, struct mkv_track *track,
return;
if (track->last_index_entry != (size_t)-1) {
mkv_index_t *index = &mkv_d->indexes[track->last_index_entry];
- // filepos is always the cluster position, which can contain multiple
- // blocks with different timecodes - one is enough.
- // Also, never add block which are already covered by the index.
- if (index->filepos == filepos || index->timecode >= timecode)
+ // Never add blocks which are already covered by the index.
+ if (index->timecode >= timecode)
return;
}
cue_index_add(demuxer, track->tnum, filepos, timecode);