Mercurial > mplayer.hg
comparison libmpdemux/cache2.c @ 5991:ddfae38afc28
cache lower limit 32kb
author | arpi |
---|---|
date | Sun, 05 May 2002 21:43:16 +0000 |
parents | 95c14d5dbb22 |
children | c0b490505298 |
comparison
equal
deleted
inserted
replaced
5990:e5b3385775b3 | 5991:ddfae38afc28 |
---|---|
196 exit(0); | 196 exit(0); |
197 } | 197 } |
198 | 198 |
199 int stream_enable_cache(stream_t *stream,int size,int min,int prefill){ | 199 int stream_enable_cache(stream_t *stream,int size,int min,int prefill){ |
200 int ss=(stream->type==STREAMTYPE_VCD)?VCD_SECTOR_DATA:STREAM_BUFFER_SIZE; | 200 int ss=(stream->type==STREAMTYPE_VCD)?VCD_SECTOR_DATA:STREAM_BUFFER_SIZE; |
201 cache_vars_t* s=cache_init(size,ss); | 201 cache_vars_t* s; |
202 if(size<32*1024) size=32*1024; // 32kb min | |
203 s=cache_init(size,ss); | |
202 stream->cache_data=s; | 204 stream->cache_data=s; |
203 s->stream=stream; // callback | 205 s->stream=stream; // callback |
204 s->prefill=size*prefill; | 206 s->prefill=size*prefill; |
205 | 207 |
206 if((stream->cache_pid=fork())){ | 208 if((stream->cache_pid=fork())){ |