]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - vss.c
Complete re-write of the ogg vorbis audio format handler.
[paraslash.git] / vss.c
diff --git a/vss.c b/vss.c
index babcd24c9a1e55cf95b1dcb6d340e5b5d490cb06..aae601d14153d6973a8a86f8f8a93e69cd6c8bbd 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -354,7 +354,12 @@ static int setup_next_fec_group(struct fec_client *fc, struct vss_task *vsst)
                g->num_header_slices, data_slices
        );
        /* set group start */
-       tv_scale(g->first_chunk - fc->first_stream_chunk, chunk_tv, &tmp);
+       if (g->num != 0 && vsst->header_len != 0 && fc->first_stream_chunk == 0)
+               /* chunk #0 is the audio file header */
+               tv_scale(g->first_chunk - 1, chunk_tv, &tmp);
+       else
+               tv_scale(g->first_chunk - fc->first_stream_chunk,
+                       chunk_tv, &tmp);
        tv_add(&fc->stream_start, &tmp, &g->start);
        return 1;
 }