summaryrefslogtreecommitdiffstats
path: root/player/playloop.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-20 00:16:37 +0200
committerwm4 <wm4@nowhere>2014-07-20 00:16:43 +0200
commit1313d38efb677ff1667333e1c1a3be9726efeb50 (patch)
treefc52344f0f3522f1774e9811707390641d6a73b0 /player/playloop.c
parentb0ff0527a37d988bfbc12d441c60523a50647f84 (diff)
downloadmpv-1313d38efb677ff1667333e1c1a3be9726efeb50.tar.bz2
mpv-1313d38efb677ff1667333e1c1a3be9726efeb50.tar.xz
player: don't wait forever with --cache-pause-below behavior
Commit dc00b146, which disables polling by default, missed another instance of polling: when the player pauses automatically on low cache. This could lead to apparent freezes when playing network streams.
Diffstat (limited to 'player/playloop.c')
-rw-r--r--player/playloop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/playloop.c b/player/playloop.c
index c18c1cb5ce..0622fca72b 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -625,6 +625,7 @@ static void handle_pause_on_low_cache(struct MPContext *mpctx)
if (!opts->pause)
unpause_player(mpctx);
}
+ mpctx->sleeptime = MPMIN(mpctx->sleeptime, 0.2);
} else {
if (cache_kb >= 0 && cache_kb <= opts->stream_cache_pause && !idle &&
opts->stream_cache_pause < opts->stream_cache_unpause)