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,"-"));