# HG changeset patch # User mosu # Date 1063403248 0 # Node ID 472c5531b695fe31c9bd4f5d1815535ca612cb82 # Parent 12e04913ba25a6614d22800532d8587c6f3c8163 Improved backwards seeking for small seek steps. Patch by matthieu . diff -r 12e04913ba25 -r 472c5531b695 libmpdemux/demux_mkv.cpp --- a/libmpdemux/demux_mkv.cpp Fri Sep 12 19:14:56 2003 +0000 +++ b/libmpdemux/demux_mkv.cpp Fri Sep 12 21:47:28 2003 +0000 @@ -1,3 +1,9 @@ +// Matroska demuxer +// written by Moritz Bunkus +// License: GPL of course ;) + +// $Id$ + extern "C" { #include "config.h" } @@ -2416,9 +2422,7 @@ 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]; }