summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-03-21 21:58:14 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-03-21 21:58:14 +0000
commit8d1f2ba5e1f411836a7470f1b70676d2fe870303 (patch)
treea66b8c3d95228fc0b7a908ce3eb9e689d54de8d0 /libavcodec/mpegaudiodec.c
parent2a42b5c37f9bbbbbe38df8344363b45af53b68a0 (diff)
static allocation rewrite (old code was plain a broken mess)
doesnt call realloc every time doesnt randomly overwrite memory after after 8-16 calls doesnt use ugly macro wraper fewer lines of code Originally committed as revision 2912 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 58caf65109..a9eed4e36a 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -400,11 +400,11 @@ static int decode_init(AVCodecContext * avctx)
}
/* compute n ^ (4/3) and store it in mantissa/exp format */
- if (!av_mallocz_static(&table_4_3_exp,
- TABLE_4_3_SIZE * sizeof(table_4_3_exp[0])))
+ table_4_3_exp= av_mallocz_static(TABLE_4_3_SIZE * sizeof(table_4_3_exp[0]));
+ if(!table_4_3_exp)
return -1;
- if (!av_mallocz_static(&table_4_3_value,
- TABLE_4_3_SIZE * sizeof(table_4_3_value[0])))
+ table_4_3_value= av_mallocz_static(TABLE_4_3_SIZE * sizeof(table_4_3_value[0]));
+ if(!table_4_3_value)
return -1;
int_pow_init();