changeset 18067:ac7eaa0313c2

avoid cache fill status overflow with caches > ca. 20 MB
author reimar
date Sun, 09 Apr 2006 18:16:29 +0000
parents 2ee39341b7a6
children c34ffa6f5fa8
files libmpdemux/cache2.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/cache2.c	Sun Apr 09 13:52:45 2006 +0000
+++ b/libmpdemux/cache2.c	Sun Apr 09 18:16:29 2006 +0000
@@ -110,7 +110,7 @@
     total+=len;
     
   }
-  cache_fill_status=100*(s->max_filepos-s->read_filepos)/s->buffer_size;
+  cache_fill_status=(s->max_filepos-s->read_filepos)/(s->buffer_size / 100);
   return total;
 }