]> git.tue.mpg.de Git - paraslash.git/commitdiff
wma: Use smaller chunks.
authorAndre Noll <maan@systemlinux.org>
Mon, 30 Nov 2009 22:38:51 +0000 (23:38 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 30 Nov 2009 22:38:51 +0000 (23:38 +0100)
This avoids buffer underuns in case the stream is started in the middle of the file.

wma_afh.c

index f0b73b2965bb07d0e49925bfcc776fddbaefafa8..9cf8e50190db96d86da9eeb76aa2cd6c04ca8236 100644 (file)
--- a/wma_afh.c
+++ b/wma_afh.c
@@ -216,7 +216,7 @@ static int wma_make_chunk_table(char *buf, size_t buf_size, int block_align,
                goto fail;
        afhi->seconds_total = num_frames * 2048 /* FIXME */
                / afhi->frequency;
-       frames_per_chunk = num_frames / num_superframes;
+       frames_per_chunk = num_frames / num_superframes / 2;
        PARA_INFO_LOG("%d frames per chunk\n", frames_per_chunk);
        j = 1;
        FOR_EACH_FRAME(f, start, buf_size, block_align) {