mirror of https://github.com/mpv-player/mpv
0b428e4482
Add the --cache-secs option, which literally overrides the value of --demuxer-readahead-secs if the stream cache is active. The default value is very high (10 seconds), which means it can act as network cache. Remove the old behavior of trying to pause once the byte cache runs low. Instead, do something similar wit the demuxer cache. The nice thing is that we can guess how many seconds of video it has cached, and we can make better decisions. But for now, apply a relatively naive heuristic: if the cache is below 0.5 secs, pause, and wait until at least 2 secs are available. Note that due to timestamp reordering, the estimated cached duration of video might be inaccurate, depending on the file format. If the file format has DTS, it's easy, otherwise the duration will seemingly jump back and forth. |
||
---|---|---|
.. | ||
codec_tags.c | ||
codec_tags.h | ||
demux.c | ||
demux.h | ||
demux_cue.c | ||
demux_disc.c | ||
demux_edl.c | ||
demux_lavf.c | ||
demux_libass.c | ||
demux_mf.c | ||
demux_mkv.c | ||
demux_playlist.c | ||
demux_raw.c | ||
demux_subreader.c | ||
demux_tv.c | ||
ebml.c | ||
ebml.h | ||
matroska.h | ||
mf.c | ||
mf.h | ||
ms_hdr.h | ||
packet.c | ||
packet.h | ||
stheader.h |