From 267916c82be0b05f936abd75fe7a196e1fd3e4eb Mon Sep 17 00:00:00 2001 From: arpi Date: Mon, 17 Dec 2001 16:56:56 +0000 Subject: [PATCH] precaching git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3564 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mencoder.c | 2 +- mplayer.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mencoder.c b/mencoder.c index 70ace195d6..dc0773058b 100644 --- a/mencoder.c +++ b/mencoder.c @@ -353,7 +353,7 @@ divx4_param.rc_reaction_ratio = 20; printf("success: format: %d data: 0x%X - 0x%X\n",file_format, (int)(stream->start_pos),(int)(stream->end_pos)); - if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024); + if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024,0,0); //demuxer=demux_open(stream,file_format,video_id,audio_id,dvdsub_id); demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id); diff --git a/mplayer.c b/mplayer.c index d603b6ede5..99d3ea0fb2 100644 --- a/mplayer.c +++ b/mplayer.c @@ -821,7 +821,8 @@ if(stream_dump_type==5){ #endif current_module=NULL; - if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024); + // initial prefill: 20% later: 5% (should be set by -cacheopts) + if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024/5,stream_cache_size*1024/20); use_stdin=filename && (!strcmp(filename,"-"));