X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=5909859be6384604513185afebbe35e7152e27be;hp=94afa1cf16fb9d9e7271ef6e5904085ef443589c;hb=ef9c3e5f615987120b8c6d51f64e49176ddb176f;hpb=f23669d91a09066b7ecd7b07a74bea8fad61ad39 diff --git a/audiod.c b/audiod.c index 94afa1cf..5909859b 100644 --- a/audiod.c +++ b/audiod.c @@ -363,7 +363,8 @@ char *get_time_string(void) if (s->receiver_node->btrn) { btr_get_node_start(s->receiver_node->btrn, &rstime); ret = tv_diff(&rstime, &sss, &rskip); - if (ret > 0) { /* audiod was started in the middle of the stream */ + if (ret > 0 && rskip.tv_sec > 2) { + /* audiod was started in the middle of the stream */ tv_add(&wtime, &rskip, &sum); seconds += sum.tv_sec; } else @@ -1229,10 +1230,15 @@ static void close_slot(int slot_num) static void close_unused_slots(void) { int i; + bool dump = false; FOR_EACH_SLOT(i) - if (must_close_slot(i)) + if (must_close_slot(i)) { close_slot(i); + dump = true; + } + if (dump) + audiod_status_dump(true); } /* @@ -1277,6 +1283,7 @@ static void start_stop_decoders(void) open_writers(sl); activate_grab_clients(&sched); btr_log_tree(sl->receiver_node->btrn, LL_NOTICE); + audiod_status_dump(true); } static void status_pre_select(struct sched *s, void *context)