summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/mplayer.c14
-rw-r--r--video/out/vo.c15
-rw-r--r--video/out/vo.h4
3 files changed, 2 insertions, 31 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index df6b42973e..0b1bee4179 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -3771,18 +3771,8 @@ static void run_playloop(struct MPContext *mpctx)
}
}
}
- if (sleeptime > 0) {
- int sleep_ms = sleeptime * 1000;
- if (mpctx->sh_video) {
- unsigned int vo_sleep = vo_get_sleep_time(mpctx->video_out);
- sleep_ms = FFMIN(sleep_ms, vo_sleep);
- if (mpctx->mouse_waiting_hide) {
- vo_sleep = mpctx->mouse_timer - GetTimerMS();
- sleep_ms = FFMIN(sleep_ms, vo_sleep);
- }
- }
- mp_input_get_cmd(mpctx->input, sleep_ms, true);
- }
+ if (sleeptime > 0)
+ mp_input_get_cmd(mpctx->input, sleeptime * 1000, true);
}
//================= Keyboard events, SEEKing ====================
diff --git a/video/out/vo.c b/video/out/vo.c
index de73d35ecc..bf4f1660e1 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -228,7 +228,6 @@ void vo_flip_page(struct vo *vo, unsigned int pts_us, int duration)
void vo_check_events(struct vo *vo)
{
- vo->next_wakeup_time = GetTimerMS() + 60 * 1000;
if (!vo->config_ok) {
if (vo->registered_fd != -1)
mp_input_rm_key_fd(vo->input_ctx, vo->registered_fd);
@@ -238,20 +237,6 @@ void vo_check_events(struct vo *vo)
vo_control(vo, VOCTRL_CHECK_EVENTS, NULL);
}
-// Return the amount of time vo_check_events() should be called in milliseconds.
-// Note: video timing is completely separate from this.
-unsigned int vo_get_sleep_time(struct vo *vo)
-{
- unsigned int sleep = 60 * 1000;
- if (vo->config_ok && vo->next_wakeup_time) {
- unsigned int now = GetTimerMS();
- sleep = 0;
- if (vo->next_wakeup_time >= now)
- sleep = vo->next_wakeup_time - now;
- }
- return sleep;
-}
-
void vo_seek_reset(struct vo *vo)
{
vo_control(vo, VOCTRL_RESET, NULL);
diff --git a/video/out/vo.h b/video/out/vo.h
index 814268e1c6..f357b21797 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -237,9 +237,6 @@ struct vo {
double flip_queue_offset; // queue flip events at most this much in advance
- unsigned int next_wakeup_time; // deadline for next vo_check_events() call,
- // in GetTimerMS() units (set by VO)
-
const struct vo_driver *driver;
void *priv;
struct mp_vo_opts *opts;
@@ -294,7 +291,6 @@ void vo_new_frame_imminent(struct vo *vo);
void vo_draw_osd(struct vo *vo, struct osd_state *osd);
void vo_flip_page(struct vo *vo, unsigned int pts_us, int duration);
void vo_check_events(struct vo *vo);
-unsigned int vo_get_sleep_time(struct vo *vo);
void vo_seek_reset(struct vo *vo);
void vo_destroy(struct vo *vo);