]> git.sesse.net Git - vlc/commitdiff
* stream.c: increase precache for stream without title/chapter.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 1 Aug 2004 16:03:42 +0000 (16:03 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 1 Aug 2004 16:03:42 +0000 (16:03 +0000)
src/input/stream.c

index 3ba07e1f72384a19206b7256b86dece2c60aac16..1cce7a9e6575b283e51732b2566e9f21630a134f 100644 (file)
@@ -1102,6 +1102,8 @@ static void AStreamPrebufferStream( stream_t *s )
 
     int64_t i_first = 0;
     int64_t i_start;
+    int64_t i_prebuffer = (s->p_sys->p_access->info.i_title > 1 ||
+                           s->p_sys->p_access->info.i_seekpoint > 1) ? STREAM_CACHE_PREBUFFER_SIZE : STREAM_CACHE_TRACK_SIZE / 3;
 
     msg_Dbg( s, "pre buffering" );
     i_start = mdate();
@@ -1112,7 +1114,7 @@ static void AStreamPrebufferStream( stream_t *s )
         int64_t i_date = mdate();
         int i_read;
 
-        if( s->b_die || tk->i_end >= STREAM_CACHE_PREBUFFER_SIZE ||
+        if( s->b_die || tk->i_end >= i_prebuffer ||
             (i_first > 0 && i_first + STREAM_CACHE_PREBUFFER_LENGTH < i_date) )
         {
             int64_t i_byterate;