summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-04-01 16:47:15 +0200
committerwm4 <wm4@nowhere>2017-04-01 16:47:15 +0200
commit7bab24b9b3b0621a3e91da0ac7585fd0c55085e3 (patch)
tree977ec50e563e990e25edf37ef84b19649d1b2844 /player
parentd2fcca7ad086822dfd06332c67f0bd1555fd4aaf (diff)
downloadmpv-7bab24b9b3b0621a3e91da0ac7585fd0c55085e3.tar.bz2
mpv-7bab24b9b3b0621a3e91da0ac7585fd0c55085e3.tar.xz
player: enable "buffering" pausing for DASH streams too
This wasn't enabled if no stream cache was used. It can work with only the demuxer cache. In theory this could be always enabled (even for local files), but still try to avoid this, and enable it only if the source is marked as potentially being a "network" stream. The intention is mostly to enable it for the youtube-dl pseudo-DASH support.
Diffstat (limited to 'player')
-rw-r--r--player/playloop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/playloop.c b/player/playloop.c
index d4a178b9f2..52f3c20c11 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -605,8 +605,9 @@ static void handle_pause_on_low_cache(struct MPContext *mpctx)
demux_control(mpctx->demuxer, DEMUXER_CTRL_GET_READER_STATE, &s);
int cache_buffer = 100;
+ bool use_pause_on_low_cache = c.size > 0 || mpctx->demuxer->is_network;
- if (mpctx->restart_complete && c.size > 0) {
+ if (mpctx->restart_complete && use_pause_on_low_cache) {
if (mpctx->paused && mpctx->paused_for_cache) {
if (!s.underrun && (!opts->cache_pausing || s.idle ||
s.ts_duration >= mpctx->cache_wait_time))