Mercurial > mplayer.hg
changeset 31189:edfa98275e04
Fix cache process accidentally being killed by SIGUSR1.
author | reimar |
---|---|
date | Fri, 28 May 2010 16:57:16 +0000 |
parents | aff74c63b86d |
children | 8432358f2d32 |
files | stream/cache2.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/cache2.c Fri May 28 11:52:12 2010 +0000 +++ b/stream/cache2.c Fri May 28 16:57:16 2010 +0000 @@ -351,6 +351,9 @@ */ static void cache_mainloop(cache_vars_t *s) { int sleep_count = 0; +#if FORKED_CACHE + signal(SIGUSR1, SIG_IGN); +#endif do { if (!cache_fill(s)) { #if FORKED_CACHE @@ -401,6 +404,10 @@ if (min > s->buffer_size - s->fill_limit) { min = s->buffer_size - s->fill_limit; } + // to make sure we wait for the cache process/thread to be active + // before continuing + if (min <= 0) + min = 1; #if FORKED_CACHE if((stream->cache_pid=fork())){