X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=wma_afh.c;h=51c82ad925c6291477eff925e14c225aa3f406ed;hp=f0b73b2965bb07d0e49925bfcc776fddbaefafa8;hb=f0e41e36c3f1a3a5bb6ff66d92d2814391d8f908;hpb=29a8e4384c08cb4e295e5b82994e62bf247a0ef7;ds=sidebyside diff --git a/wma_afh.c b/wma_afh.c index f0b73b29..51c82ad9 100644 --- a/wma_afh.c +++ b/wma_afh.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Andre Noll + * Copyright (C) 2009-2012 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -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) { @@ -257,7 +257,6 @@ static int wma_get_file_info(char *map, size_t numbytes, __a_unused int fd, afhi->frequency = ahi.sample_rate; afhi->channels = ahi.channels; afhi->header_len = ahi.header_len; - afhi->header_offset = 0; wma_make_chunk_table(map + ahi.header_len, numbytes - ahi.header_len, ahi.block_align, afhi); read_asf_tags(map, ahi.header_len, &afhi->tags);