diff options
author | wm4 <wm4@nowhere> | 2014-01-22 23:44:43 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-22 23:48:57 +0100 |
commit | 16534bbd8181a09cc56ec58f98a79b465af8a40d (patch) | |
tree | 07dbd94d778b44c932c68d94d58299c064cd569e /demux | |
parent | 63fdeb79be1f5e14e54bbd1d6bb4b1f485952055 (diff) | |
download | mpv-16534bbd8181a09cc56ec58f98a79b465af8a40d.tar.bz2 mpv-16534bbd8181a09cc56ec58f98a79b465af8a40d.tar.xz |
demux_mkv: don't attempt to seek back when indexing
Pretty worthless. This is called from the seek code, which will
reinitialize these anyway. Even if seeking somehow decides to fail, the
new values are still valid.
One could say a failed seek (if that happens) should jump back to the
original position, and thus it would be better to make sure the state
is restored. But then demux_mkv_seek needs to do this correctly,
including not setting up skipping to the target timestamp. But not
bothering with this.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_mkv.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index 75556d3849..29765ca3b4 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -2575,10 +2575,6 @@ static int create_index_until(struct demuxer *demuxer, uint64_t timecode) mkv_index_t *index = get_highest_index_entry(demuxer); if (!index || index->timecode * mkv_d->tc_scale < timecode) { - int64_t old_filepos = stream_tell(s); - int64_t old_cluster_start = mkv_d->cluster_start; - int64_t old_cluster_end = mkv_d->cluster_end; - uint64_t old_cluster_tc = mkv_d->cluster_tc; if (index) stream_seek(s, index->filepos); MP_VERBOSE(demuxer, "creating index until TC %" PRIu64 "\n", timecode); @@ -2596,10 +2592,6 @@ static int create_index_until(struct demuxer *demuxer, uint64_t timecode) if (index && index->timecode * mkv_d->tc_scale >= timecode) break; } - stream_seek(s, old_filepos); - mkv_d->cluster_start = old_cluster_start; - mkv_d->cluster_end = old_cluster_end; - mkv_d->cluster_tc = old_cluster_tc; } if (!mkv_d->indexes) { MP_WARN(demuxer, "no target for seek found\n"); |