diff options
author | wm4 <wm4@nowhere> | 2017-02-02 18:03:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-02-02 18:03:29 +0100 |
commit | e13a62fc346867450cd41d02cffbdaf477a3fec4 (patch) | |
tree | 3e8675f07f4d2e58de765823944141d5fd83ace2 /demux/demux.c | |
parent | d11c03faeec257e1f38886e3eb79a977d41127cb (diff) | |
download | mpv-e13a62fc346867450cd41d02cffbdaf477a3fec4.tar.bz2 mpv-e13a62fc346867450cd41d02cffbdaf477a3fec4.tar.xz |
stream: better method signal caching, rename weird uncached_stream field
"uncached_stream" is a pretty bad name. It could be mistaken for a
boolean, and then its meaning would be inverted. Rename it.
Also add a "caching" field, which signals that the stream is a cache or
reads from a cache. This is easier to understand and more flexible.
Diffstat (limited to 'demux/demux.c')
-rw-r--r-- | demux/demux.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/demux/demux.c b/demux/demux.c index c4173f5965..5e43a38d81 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -1246,8 +1246,7 @@ static struct demuxer *open_given_type(struct mpv_global *global, .events = DEMUX_EVENT_ALL, }; demuxer->seekable = stream->seekable; - if (demuxer->stream->uncached_stream && - !demuxer->stream->uncached_stream->seekable) + if (demuxer->stream->underlying && !demuxer->stream->underlying->seekable) demuxer->seekable = false; struct demux_internal *in = demuxer->in = talloc_ptrtype(demuxer, in); @@ -1264,7 +1263,7 @@ static struct demuxer *open_given_type(struct mpv_global *global, pthread_mutex_init(&in->lock, NULL); pthread_cond_init(&in->wakeup, NULL); - if (stream->uncached_stream) + if (stream->caching) in->min_secs = MPMAX(in->min_secs, opts->min_secs_cache); *in->d_thread = *demuxer; |