summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-12 21:32:09 +0200
committerwm4 <wm4@nowhere>2014-05-12 23:24:19 +0200
commit9e94de29b7f38a6460ae680f4274f41c269a48d2 (patch)
treebe25186f3834cda3c61406b4067726e94a7abb65 /player
parent176b4abd5325e8ea3aa268ec896ade56fa3247b3 (diff)
downloadmpv-9e94de29b7f38a6460ae680f4274f41c269a48d2.tar.bz2
mpv-9e94de29b7f38a6460ae680f4274f41c269a48d2.tar.xz
player: disable hr-seek framedropping during backstepping
Diffstat (limited to 'player')
-rw-r--r--player/playloop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/player/playloop.c b/player/playloop.c
index e7637b07f5..9e7a673f73 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -225,11 +225,12 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek,
mpctx->stop_play = KEEP_PLAYING;
double hr_seek_offset = opts->hr_seek_demuxer_offset;
+ bool hr_seek_very_exact = seek.exact > 1;
// Always try to compensate for possibly bad demuxers in "special"
// situations where we need more robustness from the hr-seek code, even
// if the user doesn't use --hr-seek-demuxer-offset.
// The value is arbitrary, but should be "good enough" in most situations.
- if (seek.exact > 1)
+ if (hr_seek_very_exact)
hr_seek_offset = MPMAX(hr_seek_offset, 0.5); // arbitrary
bool hr_seek = mpctx->demuxer->accurate_seek && opts->correct_pts;
@@ -349,7 +350,7 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek,
// seeking past the chapter is handled elsewhere.
if (hr_seek || mpctx->timeline) {
mpctx->hrseek_active = true;
- mpctx->hrseek_framedrop = true;
+ mpctx->hrseek_framedrop = !hr_seek_very_exact;
mpctx->hrseek_pts = hr_seek ? seek.amount
: mpctx->timeline[mpctx->timeline_part].start;
}