summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cfg-mplayer.h1
-rw-r--r--mplayer.c2
-rw-r--r--options.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 9c97caa93a..c8ca92e3a3 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -901,6 +901,7 @@ const m_option_t mplayer_opts[]={
OPT_MAKE_FLAGS("initial-audio-sync", initial_audio_sync, 0),
OPT_CHOICE("hr-seek", hr_seek, 0,
({"off", -1}, {"absolute", 0}, {"always", 1}, {"on", 1})),
+ OPT_FLOATRANGE("hr-seek-demuxer-offset", hr_seek_demuxer_offset, 0, -9, 99),
OPT_FLAG_CONSTANTS("noautosync", autosync, 0, 0, -1),
OPT_INTRANGE("autosync", autosync, 0, 0, 10000),
diff --git a/mplayer.c b/mplayer.c
index c13f56a143..eef8302aed 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3306,6 +3306,8 @@ static int seek(MPContext *mpctx, struct seek_params seek,
else if (seek.direction > 0)
demuxer_style |= SEEK_FORWARD;
+ if (hr_seek)
+ demuxer_amount -= opts->hr_seek_demuxer_offset;
int seekresult = demux_seek(mpctx->demuxer, demuxer_amount, audio_delay,
demuxer_style);
if (need_reset)
diff --git a/options.h b/options.h
index 3aee5dedc5..9f1352d98f 100644
--- a/options.h
+++ b/options.h
@@ -54,6 +54,7 @@ typedef struct MPOpts {
int user_pts_assoc_mode;
int initial_audio_sync;
int hr_seek;
+ float hr_seek_demuxer_offset;
int autosync;
int softsleep;
int rtc;