1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00

player: handle hrseek framedrop correctly

This was non-sense and checked the option instead of the actual flag.
Possibly could lead to incorrect hr-seeks.
This commit is contained in:
wm4 2016-01-12 23:48:28 +01:00
parent 671df54e4d
commit 6fc0fe4426
2 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,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 = !hr_seek_very_exact;
mpctx->hrseek_framedrop = !hr_seek_very_exact && opts->hr_seek_framedrop;
mpctx->hrseek_pts = hr_seek ? seek.amount
: mpctx->timeline[mpctx->timeline_part].start;

View File

@ -394,7 +394,7 @@ static int decode_image(struct MPContext *mpctx)
bool hrseek = mpctx->hrseek_active && mpctx->video_status == STATUS_SYNCING;
int framedrop_type = check_framedrop(mpctx);
if (hrseek && pkt && pkt->pts < mpctx->hrseek_pts - .005 &&
!d_video->has_broken_packet_pts && mpctx->opts->hr_seek_framedrop)
!d_video->has_broken_packet_pts && mpctx->hrseek_framedrop)
{
framedrop_type = 2;
}