From f794444309a826478fefa00bf13d660793066b81 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 9 Jun 2013 22:47:17 +0200 Subject: stream: don't set sector size on cache This is useless on the cache side. The sector is needed only to deal with stream implementations which are not byte addressable, and the cache is always byte addressable. Also set a default read_chunk value. (This value is never used unless you chain multiple caches, but it's cleaner.) --- stream/stream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'stream') diff --git a/stream/stream.c b/stream/stream.c index a811ec59e0..3281e50fe6 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -744,14 +744,12 @@ int stream_enable_cache(stream_t **stream, int64_t size, int64_t min, cache->uncached_stream = orig; cache->flags |= MP_STREAM_SEEK; cache->mode = STREAM_READ; + cache->read_chunk = 4 * STREAM_BUFFER_SIZE; - cache->read_chunk = orig->read_chunk; cache->url = strdup(orig->url); cache->mime_type = talloc_strdup(cache, orig->mime_type); cache->lavf_type = orig->lavf_type; cache->opts = orig->opts; - cache->sector_size = orig->sector_size; - cache->read_chunk = orig->read_chunk; cache->start_pos = orig->start_pos; cache->end_pos = orig->end_pos; -- cgit v1.2.3