diff options
Diffstat (limited to 'src/pulsecore/core.c')
-rw-r--r-- | src/pulsecore/core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c index 3b758a38..b2638b10 100644 --- a/src/pulsecore/core.c +++ b/src/pulsecore/core.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /*** This file is part of PulseAudio. @@ -135,7 +133,6 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) { c->resample_method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 3; - c->is_system_instance = FALSE; c->disallow_module_loading = FALSE; c->realtime_scheduling = FALSE; c->realtime_priority = 5; @@ -210,11 +207,16 @@ static void quit_callback(pa_mainloop_api*m, pa_time_event *e, PA_GCC_UNUSED con void pa_core_check_quit(pa_core *c) { pa_assert(c); - if (!c->quit_event && c->exit_idle_time >= 0 && pa_idxset_size(c->clients) == 0) { + if (!c->quit_event && + c->exit_idle_time >= 0 && + pa_idxset_size(c->clients) == 0) { + struct timeval tv; pa_gettimeofday(&tv); tv.tv_sec+= c->exit_idle_time; + c->quit_event = c->mainloop->time_new(c->mainloop, &tv, quit_callback, c); + } else if (c->quit_event && pa_idxset_size(c->clients) > 0) { c->mainloop->time_free(c->quit_event); c->quit_event = NULL; |