From 653980ac3a6f312f7f1343b0c8f8bcdd550fea89 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 14 Dec 2013 01:21:06 +0100 Subject: dvdnav, tv: force-disable caching On dvdnav, caching kind of works but not really. (Not our fault, at least not fully. It's due to libdvdnav being slightly misdesigned; see previous commit for some explanations.) The TV code is implemented in the demuxer, and the stream implementation is just a wrapper, so caching makes no sense here. --- stream/stream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stream/stream.c') diff --git a/stream/stream.c b/stream/stream.c index 8a31b45254..dd1fc34435 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -290,6 +290,7 @@ static int open_internal(const stream_info_t *sinfo, struct stream *underlying, s->url = talloc_strdup(s, url); s->path = talloc_strdup(s, path); s->source = underlying; + s->allow_caching = true; // Parse options if (sinfo->priv_size) { @@ -805,7 +806,7 @@ static int stream_enable_cache(stream_t **stream, int64_t size, int64_t min, { stream_t *orig = *stream; - if (orig->mode != STREAM_READ) + if (orig->mode != STREAM_READ || !orig->allow_caching) return 1; stream_t *cache = new_stream(); -- cgit v1.2.3