From e89405390dc82917fcde6c00393bd2dfd82ddbfa Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 28 May 2006 21:12:35 +0200 Subject: [PATCH] Open the filters from within audiod_pre_select() --- audiod.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/audiod.c b/audiod.c index 5e8cf2bc..60e7903f 100644 --- a/audiod.c +++ b/audiod.c @@ -616,6 +616,7 @@ static void open_filters(int slot_num) s->fc = NULL; if (!nf) return; + PARA_INFO_LOG("opening %s filters\n", audio_formats[s->format]); s->fc = para_calloc(sizeof(struct filter_chain)); INIT_LIST_HEAD(&s->fc->filters); s->fc->inbuf = s->receiver_node->buf; @@ -688,14 +689,12 @@ static void wng_event_handler(struct task *t) } } -static void start_stream_writer(int slot_num, struct timeval *now) +static void open_writer(int slot_num, struct timeval *now) { int ret, i; struct slot_info *s = &slot[slot_num]; struct audio_format_info *a = &afi[s->format]; - PARA_INFO_LOG("opening %s filters\n", audio_formats[s->format]); - open_filters(slot_num); PARA_INFO_LOG("opening %s writers\n", audio_formats[s->format]); if (!a->num_writers) s->wng = setup_default_wng(); @@ -945,8 +944,8 @@ static void audiod_pre_select(struct sched *s, __a_unused struct task *t) continue; rn = slot[i].receiver_node; if (rn && rn->loaded && !slot[i].wng) { - PARA_INFO_LOG("no writer in slot %d\n", i); - start_stream_writer(i, &s->now); + open_filters(i); + open_writer(i, &s->now); } } } -- 2.39.5