Mercurial > libavcodec.hg
changeset 404:29dc52c127c6 libavcodec
fixed one overflow problem
author | glantau |
---|---|
date | Mon, 20 May 2002 21:15:53 +0000 |
parents | 2c3e25f4c496 |
children | 053b3a7a1760 |
files | mpegaudiodec.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegaudiodec.c Mon May 20 16:37:58 2002 +0000 +++ b/mpegaudiodec.c Mon May 20 21:15:53 2002 +0000 @@ -1,6 +1,6 @@ /* * MPEG Audio decoder - * Copyright (c) 2001 Gerard Lantau. + * Copyright (c) 2001, 2002 Gerard Lantau. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -127,7 +127,7 @@ static UINT16 band_index_long[9][23]; /* XXX: free when all decoders are closed */ #define TABLE_4_3_SIZE (8191 + 16) -static UINT8 *table_4_3_exp; +static INT8 *table_4_3_exp; #if FRAC_BITS <= 15 static UINT16 *table_4_3_value; #else @@ -1955,7 +1955,7 @@ } } -#ifdef DEBUG +#if defined(DEBUG) void sample_dump(int fnum, INT32 *tab, int n) { static FILE *files[16], *f; @@ -2168,7 +2168,7 @@ } g->scale_factors[j++] = 0; } -#ifdef DEBUG +#if defined(DEBUG) { printf("scfsi=%x gr=%d ch=%d scale_factors:\n", g->scfsi, gr, ch); @@ -2225,7 +2225,7 @@ /* XXX: should compute exact size */ for(;j<40;j++) g->scale_factors[j] = 0; -#ifdef DEBUG +#if defined(DEBUG) { printf("gr=%d ch=%d scale_factors:\n", gr, ch); @@ -2242,8 +2242,8 @@ if (huffman_decode(s, g, exponents, bits_pos + g->part2_3_length) < 0) return -1; -#if defined(DEBUG) && 0 - sample_dump(3, g->sb_hybrid, 576); +#if defined(DEBUG) + sample_dump(0, g->sb_hybrid, 576); #endif /* skip extension bits */ @@ -2267,7 +2267,7 @@ g = &granules[ch][gr]; reorder_block(s, g); -#ifdef DEBUG +#if defined(DEBUG) sample_dump(0, g->sb_hybrid, 576); #endif compute_antialias(s, g);