# HG changeset patch # User reimar # Date 1275072423 0 # Node ID f41fda4fe85fa208d3c936fe0541558f80112d8a # Parent 8e96ba5f45795817be3934d660ea8e8ce734aafe 100l, stream_check_for_interrupt argument is not in usec, so we would end up sleeping for 10s instead of 10ms. diff -r 8e96ba5f4579 -r f41fda4fe85f stream/cache2.c --- a/stream/cache2.c Fri May 28 18:45:25 2010 +0000 +++ b/stream/cache2.c Fri May 28 18:47:03 2010 +0000 @@ -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 @@ // 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; }