Mercurial > mplayer.hg
comparison mplayer.c @ 7881:aba9301ed3c4
allow cache to be disabled (-nocache should override cachesize autodetection
in stream layer)
author | arpi |
---|---|
date | Wed, 23 Oct 2002 22:07:29 +0000 |
parents | 3dc0b71630ff |
children | 40aa6cf5a66b |
comparison
equal
deleted
inserted
replaced
7880:5bb4d8801a2c | 7881:aba9301ed3c4 |
---|---|
192 static char* spudec_ifo=NULL; | 192 static char* spudec_ifo=NULL; |
193 int vcd_track=0; | 193 int vcd_track=0; |
194 char* filename=NULL; //"MI2-Trailer.avi"; | 194 char* filename=NULL; //"MI2-Trailer.avi"; |
195 | 195 |
196 // cache2: | 196 // cache2: |
197 int stream_cache_size=0; | 197 int stream_cache_size=-1; |
198 #ifdef USE_STREAM_CACHE | 198 #ifdef USE_STREAM_CACHE |
199 extern int cache_fill_status; | 199 extern int cache_fill_status; |
200 #else | 200 #else |
201 #define cache_fill_status 0 | 201 #define cache_fill_status 0 |
202 #endif | 202 #endif |
975 #ifdef USE_DVDNAV | 975 #ifdef USE_DVDNAV |
976 if (dvd_nav) stream_cache_size=0; // must disable caching... | 976 if (dvd_nav) stream_cache_size=0; // must disable caching... |
977 #endif | 977 #endif |
978 | 978 |
979 // CACHE2: initial prefill: 20% later: 5% (should be set by -cacheopts) | 979 // CACHE2: initial prefill: 20% later: 5% (should be set by -cacheopts) |
980 if(stream_cache_size){ | 980 if(stream_cache_size>0){ |
981 current_module="enable_cache"; | 981 current_module="enable_cache"; |
982 if(!stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024/5,stream_cache_size*1024/20)) | 982 if(!stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024/5,stream_cache_size*1024/20)) |
983 if((eof = libmpdemux_was_interrupted(PT_NEXT_ENTRY))) goto goto_next_file; | 983 if((eof = libmpdemux_was_interrupted(PT_NEXT_ENTRY))) goto goto_next_file; |
984 } | 984 } |
985 | 985 |