From 9e94de29b7f38a6460ae680f4274f41c269a48d2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 12 May 2014 21:32:09 +0200 Subject: [PATCH] player: disable hr-seek framedropping during backstepping --- player/playloop.c | 5 +++-- 1 file 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; }