mirror of
https://github.com/mpv-player/mpv
synced 2025-01-18 13:14:36 +00:00
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
This commit is contained in:
parent
c61a9674f1
commit
45a22abd6c
@ -1,3 +1,9 @@
|
|||||||
|
// Matroska demuxer
|
||||||
|
// written by Moritz Bunkus <moritz@bunkus.org>
|
||||||
|
// License: GPL of course ;)
|
||||||
|
|
||||||
|
// $Id$
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "config.h"
|
#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)
|
if (!index->entries[k].is_key)
|
||||||
continue;
|
continue;
|
||||||
diff = target_timecode - (int64_t)index->entries[k].timecode;
|
diff = target_timecode - (int64_t)index->entries[k].timecode;
|
||||||
if (diff < 0)
|
if ((diff > 0) && (diff < min_diff)) {
|
||||||
diff *= -1;
|
|
||||||
if (diff < min_diff) {
|
|
||||||
min_diff = diff;
|
min_diff = diff;
|
||||||
entry = & index->entries[k];
|
entry = & index->entries[k];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user