From 7bab24b9b3b0621a3e91da0ac7585fd0c55085e3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 1 Apr 2017 16:47:15 +0200 Subject: 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. --- player/playloop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player') 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)) -- cgit v1.2.3