From 40f822782d036d206a95b8447b709ea2a65b151e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 24 Apr 2013 15:26:54 +0200 Subject: [PATCH] mplayer: apply hrseek framedrop only when doing hrseek It's not sure if there's anything that could trigger this accidentally. Normally this can't happen, because hrseek ends always if the PTS is large enough, the same condition which disables framedrop. Seeking resets hrseek framedrop anyway. On the other hand, this change makes the code easier to understand, and might be more robust against weird corner cases. --- core/mplayer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mplayer.c b/core/mplayer.c index 8bbae751a6..aa7a538a73 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -2546,8 +2546,8 @@ static double update_video(struct MPContext *mpctx) pts += mpctx->video_offset; if (pts >= mpctx->hrseek_pts - .005) mpctx->hrseek_framedrop = false; - int framedrop_type = mpctx->hrseek_framedrop ? 1 : - check_framedrop(mpctx, sh_video->frametime); + int framedrop_type = mpctx->hrseek_active && mpctx->hrseek_framedrop ? + 1 : check_framedrop(mpctx, sh_video->frametime); struct mp_image *decoded_frame = decode_video(sh_video, pkt, framedrop_type, pts); if (decoded_frame) {