# HG changeset patch # User reimar # Date 1276326322 0 # Node ID 7ae56026b7eeac8bbd5e59db1812821b3c2b5296 # Parent 0ee3a65450b2325be242b0b7e374a8506405e694 Respect -cache-seek-min also for on-disk files to reduce issues with mov. diff -r 0ee3a65450b2 -r 7ae56026b7ee stream/cache2.c --- a/stream/cache2.c Fri Jun 11 15:19:42 2010 +0000 +++ b/stream/cache2.c Sat Jun 12 07:05:22 2010 +0000 @@ -181,9 +181,11 @@ if(readmin_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 || - readmin_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(readmin_filepos || read>=s->max_filepos+s->seek_limit) { s->offset= // FIXME!? s->min_filepos=s->max_filepos=read; // drop cache content :(