summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-05-28 18:47:03 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-05-28 18:47:03 +0000
commit27d41fa5b353be63e8578b49b33359ed11a82276 (patch)
tree413203fce950da8377deb5d76018692c4fa12b28 /stream
parent16e3978e1e1b2f8a302b7e45d4b09e602e6b8733 (diff)
downloadmpv-27d41fa5b353be63e8578b49b33359ed11a82276.tar.bz2
mpv-27d41fa5b353be63e8578b49b33359ed11a82276.tar.xz
100l, stream_check_for_interrupt argument is not in usec,
so we would end up sleeping for 10s instead of 10ms. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31254 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/cache2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stream/cache2.c b/stream/cache2.c
index dd9f4414a7..1e0bea9c7b 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -22,7 +22,7 @@
// Note it runs in 2 processes (using fork()), but doesn't require locking!!
// TODO: seeking, data consistency checking
-#define READ_USLEEP_TIME 10000
+#define READ_SLEEP_TIME 10
// These defines are used to reduce the cost of many successive
// seeks (e.g. when a file has no index) by spinning quickly at first.
#define INITIAL_FILL_USLEEP_TIME 1000
@@ -127,14 +127,14 @@ static int cache_read(cache_vars_t *s, unsigned char *buf, int size)
// eof?
if(s->eof) break;
if (s->max_filepos == last_max) {
- if (sleep_count++ == 5)
+ if (sleep_count++ == 10)
mp_msg(MSGT_CACHE, MSGL_WARN, "Cache not filling!\n");
} else {
last_max = s->max_filepos;
sleep_count = 0;
}
// waiting for buffer fill...
- if (stream_check_interrupt(READ_USLEEP_TIME)) {
+ if (stream_check_interrupt(READ_SLEEP_TIME)) {
s->eof = 1;
break;
}