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.
This commit is contained in:
wm4 2013-04-24 15:26:54 +02:00
parent d853abafc3
commit 40f822782d
1 changed files with 2 additions and 2 deletions

View File

@ -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) {