X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write_common.c;h=e76d7f46a537a1c00f47dc055506d39e13cf9bc2;hp=a7896fcb4ebd039e7401671c232ad2198bad8917;hb=f6c929d9e580bb1f2666236b16de1e3fe73878d3;hpb=780f86d5f849308b5100b087c6b223a6deef1dd7 diff --git a/write_common.c b/write_common.c index a7896fcb..e76d7f46 100644 --- a/write_common.c +++ b/write_common.c @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ +/** \file write_common.c common functions of para_audiod and para_write */ + #include "para.h" #include "string.h" #include "write.h" @@ -33,7 +35,6 @@ int wng_write(struct writer_node_group *g, char *buf, size_t *loaded) need_more_writes = 0; FOR_EACH_WRITER_NODE(i, g) { size_t w = g->written[i]; - unsigned char *p = buf + w; int bytes_to_write; struct writer_node *wn = &g->writer_nodes[i]; if (!i) @@ -46,7 +47,7 @@ int wng_write(struct writer_node_group *g, char *buf, size_t *loaded) continue; bytes_to_write = PARA_MIN(wn->chunk_bytes, *loaded - w); - ret = wn->writer->write(p, bytes_to_write, wn); + ret = wn->writer->write(buf + w, bytes_to_write, wn); if (ret < 0) goto out; if (ret != bytes_to_write)