From e13a62fc346867450cd41d02cffbdaf477a3fec4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 2 Feb 2017 18:03:29 +0100 Subject: 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. --- demux/demux.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'demux') 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; -- cgit v1.2.3