changeset 5991:ddfae38afc28

cache lower limit 32kb
author arpi
date Sun, 05 May 2002 21:43:16 +0000
parents e5b3385775b3
children b70736ca6f0c
files libmpdemux/cache2.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/cache2.c	Sun May 05 21:33:13 2002 +0000
+++ b/libmpdemux/cache2.c	Sun May 05 21:43:16 2002 +0000
@@ -198,7 +198,9 @@
 
 int stream_enable_cache(stream_t *stream,int size,int min,int prefill){
   int ss=(stream->type==STREAMTYPE_VCD)?VCD_SECTOR_DATA:STREAM_BUFFER_SIZE;
-  cache_vars_t* s=cache_init(size,ss);
+  cache_vars_t* s;
+  if(size<32*1024) size=32*1024; // 32kb min
+  s=cache_init(size,ss);
   stream->cache_data=s;
   s->stream=stream; // callback
   s->prefill=size*prefill;