mirror of https://github.com/mpv-player/mpv
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.)
This commit is contained in:
parent
48faa8c3a8
commit
f794444309
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue