X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=eb3b200ae6e5969be231c8be3e169d52e4430873;hp=778196542d63dc855a6c8ccd6228362b434b698f;hb=becb57ea3aec697bfe953a0c3608e4c255b6d24b;hpb=0855a5fcdbebabacebee968939cf00bf3161cfaf diff --git a/audiod.c b/audiod.c index 77819654..eb3b200a 100644 --- a/audiod.c +++ b/audiod.c @@ -49,8 +49,8 @@ struct audio_format_info { void **filter_conf; /** the number of filters that should be activated for this audio format */ unsigned int num_writers; - /** pointer to the array of writers to be activated */ - struct writer **writers; + /** Array of writer numbers to be activated. */ + int *writer_nums; /** pointer to the array of writer configurations */ void **writer_conf; /** do not start receiver/filters/writer before this time */ @@ -434,13 +434,11 @@ static void open_writers(int slot_num) } for (i = 0; i < a->num_writers; i++) { s->wng->writer_nodes[i].conf = a->writer_conf[i]; - s->wng->writer_nodes[i].writer = a->writers[i]; + s->wng->writer_nodes[i].writer_num = a->writer_nums[i]; } ret = wng_open(s->wng); - if (ret < 0) { - PARA_ERROR_LOG("%s\n", para_strerror(-ret)); + if (ret < 0) return; - } s->wstime = *now; s->server_stream_start = stat_task->server_stream_start.tv_sec? stat_task->server_stream_start : *now; @@ -691,7 +689,7 @@ static int parse_writer_args(void) FOR_EACH_AUDIO_FORMAT(i) { a = &afi[i]; a->writer_conf = para_malloc(nw * sizeof(void *)); - a->writers = para_malloc(nw * sizeof(struct writer *)); + a->writer_nums = para_malloc(nw * sizeof(int)); a->num_writers = 0; } for (i = 0; i < conf.writer_given; i++) { @@ -707,7 +705,7 @@ static int parse_writer_args(void) ret = writer_num; goto out; } - a->writers[nw] = &writers[writer_num]; + a->writer_nums[nw] = writer_num; a->writer_conf[nw] = wconf; PARA_INFO_LOG("%s writer #%d: %s\n", audio_formats[ret], nw, writer_names[writer_num]);