mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 16:33:02 +00:00
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:
parent
d853abafc3
commit
40f822782d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user