mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
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.
This commit is contained in:
parent
d2fcca7ad0
commit
7bab24b9b3
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user