summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2023-10-21 17:26:46 +0600
committerDudemanguy <random342@airmail.cc>2023-10-30 17:16:38 +0000
commit3789f1a3878a46cde7b5ef524f043c24a43b9d41 (patch)
treefd33276cf74d5f1e765eacc0fd8c6f14d6daad5f /demux
parent20fff1e509cb10c60c558be1cc1e243df3edbb32 (diff)
downloadmpv-3789f1a3878a46cde7b5ef524f043c24a43b9d41.tar.bz2
mpv-3789f1a3878a46cde7b5ef524f043c24a43b9d41.tar.xz
demux: make hysteresis-secs respect cache-secs
currently hysteresis-secs only works when the demuxer-max-bytes fills up. but it's possible for the cache-secs/demuxer-readahead-secs to be reached first. in those cases, hysteresis-secs doesn't work and keeps buffering non-stop. but the goal of this option was to save power by avoiding non-stop buffering so go ahead and make it respect cache-secs as well. additionally remove some redundant repetition from the docs.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c
index e44ba75eea..58b6b6ed81 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -2235,8 +2235,10 @@ static bool read_packet(struct demux_internal *in)
return false;
}
- if (!read_more && !prefetch_more && !refresh_more)
+ if (!read_more && !prefetch_more && !refresh_more) {
+ in->hyst_active = !!in->hyst_secs;
return false;
+ }
if (in->after_seek_to_start) {
for (int n = 0; n < in->num_streams; n++) {