diff options
author | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-09-12 21:47:28 +0000 |
---|---|---|
committer | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-09-12 21:47:28 +0000 |
commit | 45a22abd6c77b61ec770aa9f7ce21ffa0e1a4b2c (patch) | |
tree | 19fcc6a48d0287805c3384340839a8ee1cbeabd6 | |
parent | c61a9674f12c3abe220a04dfdcb853d07edc8db7 (diff) | |
download | mpv-45a22abd6c77b61ec770aa9f7ce21ffa0e1a4b2c.tar.bz2 mpv-45a22abd6c77b61ec770aa9f7ce21ffa0e1a4b2c.tar.xz |
Improved backwards seeking for small seek steps. Patch by matthieu <mat100@ifrance.com>.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10861 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/demux_mkv.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libmpdemux/demux_mkv.cpp b/libmpdemux/demux_mkv.cpp index 29941f3601..48ff30767b 100644 --- a/libmpdemux/demux_mkv.cpp +++ b/libmpdemux/demux_mkv.cpp @@ -1,3 +1,9 @@ +// Matroska demuxer +// written by Moritz Bunkus <moritz@bunkus.org> +// License: GPL of course ;) + +// $Id$ + extern "C" { #include "config.h" } @@ -2416,9 +2422,7 @@ extern "C" void demux_mkv_seek(demuxer_t *demuxer, float rel_seek_secs, if (!index->entries[k].is_key) continue; diff = target_timecode - (int64_t)index->entries[k].timecode; - if (diff < 0) - diff *= -1; - if (diff < min_diff) { + if ((diff > 0) && (diff < min_diff)) { min_diff = diff; entry = & index->entries[k]; } |