X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=wma_afh.c;h=8bff7cfcaa98f8ae3bdfb00f87545c70c7927d94;hb=be5daec66f163725489f42d512659a8af5c3fd59;hp=f2afae3bfda9430265c10d708be4f343f9b3f52a;hpb=610cb53b94af8e95326cd44b7845f35cffdb6bf3;p=paraslash.git diff --git a/wma_afh.c b/wma_afh.c index f2afae3b..8bff7cfc 100644 --- a/wma_afh.c +++ b/wma_afh.c @@ -195,7 +195,7 @@ static int wma_make_chunk_table(char *buf, size_t buf_size, uint32_t packet_size size_t ct_size = 250; int ret, count = 0, num_frames, num_superframes; - afhi->chunk_table = alloc(ct_size * sizeof(uint32_t)); + afhi->chunk_table = arr_alloc(ct_size, sizeof(uint32_t)); afhi->chunk_table[0] = 0; afhi->chunk_table[1] = afhi->header_len; @@ -318,7 +318,7 @@ static int convert_utf8_to_utf16(char *src, char **dst) int ret; if (!src || !*src) { - *dst = para_calloc(2); + *dst = zalloc(2); return 0; } /* @@ -622,7 +622,7 @@ static int wma_rewrite_tags(const char *map, size_t mapsize, if (top.reserved2 != 2) return -E_NO_WMA; p++; /* objects start at p */ - top.objects = alloc(top.num_objects * sizeof(struct asf_object)); + top.objects = arr_alloc(top.num_objects, sizeof(struct asf_object)); ret = read_asf_objects(p, top.size - (p - map), top.num_objects, top.objects, &ton); if (ret < 0)