summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-24 14:33:34 +0100
committerwm4 <wm4@nowhere>2014-12-24 14:33:34 +0100
commit2b3b88b6eec460bb78c169e00992377d07fa236b (patch)
tree4add01aa67f7c3ec582e41ba4419c97582786e72 /stream/stream.c
parent51abca8afd7661a33d54576a00a1fcc6661d1635 (diff)
downloadmpv-2b3b88b6eec460bb78c169e00992377d07fa236b.tar.bz2
mpv-2b3b88b6eec460bb78c169e00992377d07fa236b.tar.xz
stream: always disable cache for pseudo-streams
Streams which don't have a full_buffer function never return any actual data. Slight improvement over commit 5640c195.
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/stream/stream.c b/stream/stream.c
index 4b161e6c1c..1ec9d63488 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -325,6 +325,9 @@ static int open_internal(const stream_info_t *sinfo, struct stream *underlying,
if (!s->read_chunk)
s->read_chunk = 4 * (s->sector_size ? s->sector_size : STREAM_BUFFER_SIZE);
+ if (!s->fill_buffer)
+ s->allow_caching = false;
+
assert(s->seekable == !!s->seek);
s->uncached_type = s->type;