diff options
-rw-r--r-- | stream/cache.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/stream/cache.c b/stream/cache.c index 27c9a30b22..64c993975e 100644 --- a/stream/cache.c +++ b/stream/cache.c @@ -659,14 +659,6 @@ int stream_cache_init(stream_t *cache, stream_t *stream, int64_t size, if (size < 1) return -1; - MP_INFO(cache, "Cache size set to %" PRId64 " KiB\n", - size / 1024); - - if (size > SIZE_MAX) { - MP_FATAL(cache, "Cache size larger than max. allocation size\n"); - return -1; - } - struct priv *s = talloc_zero(NULL, struct priv); s->log = cache->log; @@ -678,6 +670,9 @@ int stream_cache_init(stream_t *cache, stream_t *stream, int64_t size, return -1; } + MP_INFO(cache, "Cache size set to %" PRId64 " KiB\n", + s->buffer_size / 1024); + pthread_mutex_init(&s->mutex, NULL); pthread_cond_init(&s->wakeup, NULL); |