X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=ao_write.c;h=58da91cf2c7aa066b642504a18b61832accdc20f;hb=610cb53b94af8e95326cd44b7845f35cffdb6bf3;hp=447dea84c00a468330fe8229bfd70b74292264bd;hpb=d5e27e2a346da2f18188d317926a60687d082732;p=paraslash.git diff --git a/ao_write.c b/ao_write.c index 447dea84..58da91cf 100644 --- a/ao_write.c +++ b/ao_write.c @@ -184,7 +184,7 @@ static int aow_init(struct writer_node *wn, unsigned sample_rate, ao_info *info; const struct lls_opt_result *r; unsigned n; - struct private_aow_data *pawd = para_malloc(sizeof(*pawd)); + struct private_aow_data *pawd = alloc(sizeof(*pawd)); ao_initialize(); aow_show_drivers(); @@ -357,9 +357,15 @@ static int aow_post_select(__a_unused struct sched *s, void *context) goto remove_btrn; if (ret == 0) return 0; - get_btr_sample_rate(wn->btrn, &rate); - get_btr_channels(wn->btrn, &ch); - get_btr_sample_format(wn->btrn, &format); + ret = get_btr_sample_rate(wn->btrn, &rate); + if (ret < 0) + goto remove_btrn; + ret = get_btr_channels(wn->btrn, &ch); + if (ret < 0) + goto remove_btrn; + ret = get_btr_sample_format(wn->btrn, &format); + if (ret < 0) + goto remove_btrn; ret = aow_init(wn, rate, ch, format); if (ret < 0) goto remove_btrn;