[MPlayer-cvslog] r31371 - trunk/stream/cache2.c

reimar subversion at mplayerhq.hu
Sat Jun 12 09:05:23 CEST 2010


Author: reimar
Date: Sat Jun 12 09:05:22 2010
New Revision: 31371

Log:
Respect -cache-seek-min also for on-disk files to reduce issues with mov.

Modified:
   trunk/stream/cache2.c

Modified: trunk/stream/cache2.c
==============================================================================
--- trunk/stream/cache2.c	Fri Jun 11 17:19:42 2010	(r31370)
+++ trunk/stream/cache2.c	Sat Jun 12 09:05:22 2010	(r31371)
@@ -181,9 +181,11 @@ static int cache_fill(cache_vars_t *s)
   if(read<s->min_filepos || read>s->max_filepos){
       // seek...
       mp_msg(MSGT_CACHE,MSGL_DBG2,"Out of boundaries... seeking to 0x%"PRIX64"  \n",(int64_t)read);
-      // streaming: drop cache contents only if seeking backward or too much fwd:
-      if(s->stream->type!=STREAMTYPE_STREAM ||
-          read<s->min_filepos || read>=s->max_filepos+s->seek_limit)
+      // drop cache contents only if seeking backward or too much fwd.
+      // This is also done for on-disk files, since it loses the backseek cache.
+      // That in turn can cause major bandwidth increase and performance
+      // issues with e.g. mov or badly interleaved files
+      if(read<s->min_filepos || read>=s->max_filepos+s->seek_limit)
       {
         s->offset= // FIXME!?
         s->min_filepos=s->max_filepos=read; // drop cache content :(


More information about the MPlayer-cvslog mailing list