X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=oss_write.c;h=d583c2338bb1dc0dc96d274d49824d45a3b75c6e;hp=df9608a8c6a2bbb9b3787df76ce8ec7931604e16;hb=656a02453498156bab09763011ff43b81db57634;hpb=92f089b820b45a5dbdc5b4f69d596105d5acba68 diff --git a/oss_write.c b/oss_write.c index df9608a8..d583c233 100644 --- a/oss_write.c +++ b/oss_write.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include @@ -88,7 +87,6 @@ static int oss_init(struct writer_node *wn, unsigned sample_rate, struct oss_write_args_info *conf = wn->conf; struct private_oss_write_data *powd = para_calloc(sizeof(*powd)); - wn->private_data = powd; PARA_INFO_LOG("opening %s\n", conf->device_arg); ret = para_open(conf->device_arg, O_WRONLY, 0); if (ret < 0) @@ -149,6 +147,7 @@ static int oss_init(struct writer_node *wn, unsigned sample_rate, sample_rate); } wn->min_iqs = powd->bytes_per_frame; + wn->private_data = powd; return 1; err: close(powd->fd); @@ -185,7 +184,7 @@ static void oss_post_select(__a_unused struct sched *s, bytes = btr_next_buffer(btrn, &data); frames = bytes / powd->bytes_per_frame; if (!frames) { /* eof and less than a single frame available */ - ret = -E_OSS_EOF; + ret = -E_WRITE_COMMON_EOF; goto out; } ret = 0;