X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aac_afh.c;h=338b7827caf1d8d5a4399214c6c9dff92aaa77c3;hp=f29e55bb8eec3608c463032f46d5d5aae69efded;hb=5d1e222d208a8505c6d0e0522ecd79599db57aa8;hpb=0bd031509add6dccedb04a1e79420a7a9ca02711 diff --git a/aac_afh.c b/aac_afh.c index f29e55bb..338b7827 100644 --- a/aac_afh.c +++ b/aac_afh.c @@ -209,8 +209,10 @@ static char *aac_read_chunk(long unsigned current_chunk, ssize_t *len) *len = 0; if (current_chunk >= num_chunks) return NULL; - pos = chunk_table[current_chunk]; *len = chunk_table[current_chunk + 1] - chunk_table[current_chunk]; + if (!*len) /* nothing to send for this run */ + return inbuf; + pos = chunk_table[current_chunk]; if (inbuf_size < *len) { PARA_INFO_LOG("increasing inbuf for chunk #%lu/%zu to %zd bytes\n", current_chunk, num_chunks, *len);