summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authoriive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-07-16 20:31:17 +0000
committeriive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-07-16 20:31:17 +0000
commit9b0d8c680f63463b1dcf6cf5597018549d469c0b (patch)
treeade4bb6ce8b884a7ba46ef6eac25157c4df259da /mplayer.c
parenteb75e9bfde5b510e9272d0505e3d12700db5ae1b (diff)
downloadmpv-9b0d8c680f63463b1dcf6cf5597018549d469c0b.tar.bz2
mpv-9b0d8c680f63463b1dcf6cf5597018549d469c0b.tar.xz
cache min fill adjustment, based on patch by Jeremy Huddleston
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12836 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index c5052e4e9c..288ffba522 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -255,6 +255,9 @@ int forced_subs_only=0;
int stream_cache_size=-1;
#ifdef USE_STREAM_CACHE
extern int cache_fill_status;
+
+float stream_cache_min_percent=20.0;
+float stream_cache_prefill_percent=5.0;
#else
#define cache_fill_status 0
#endif
@@ -1375,7 +1378,7 @@ goto_enable_cache:
#endif
if(stream_cache_size>0){
current_module="enable_cache";
- if(!stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024/5,stream_cache_size*1024/20))
+ if(!stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024*(stream_cache_min_percent / 100.0),stream_cache_size*1024*(stream_cache_prefill_percent / 100.0)))
if((eof = libmpdemux_was_interrupted(PT_NEXT_ENTRY))) goto goto_next_file;
}