diff options
author | wm4 <wm4@nowhere> | 2013-04-24 15:26:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-04-24 20:25:04 +0200 |
commit | 40f822782d036d206a95b8447b709ea2a65b151e (patch) | |
tree | c552672b284ad3888127def2283bf72520a82523 | |
parent | d853abafc3e0f3de06e6cf86908f5bf2aba8f7c0 (diff) | |
download | mpv-40f822782d036d206a95b8447b709ea2a65b151e.tar.bz2 mpv-40f822782d036d206a95b8447b709ea2a65b151e.tar.xz |
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.
-rw-r--r-- | core/mplayer.c | 4 |
1 files 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) { |