summaryrefslogtreecommitdiff
path: root/libavcodec/4xm.c
diff options
context:
space:
mode:
authorBurkhard Plaum <plaum@ipf.uni-stuttgart.de>2004-11-27 18:10:06 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-11-27 18:10:06 +0000
commit073c2593c9f0aa4445a6fc1b9b24e6e52a8cc2c1 (patch)
treec7a83b25f8d183bce584cc6ed66c57f8505ea7ec /libavcodec/4xm.c
parent8a6cb11455fcc89f506a44babdce1e021f6c592c (diff)
Memory leak fix patch by (Burkhard Plaum <plaum >at< ipf.uni-stuttgart )dot( de>)
Originally committed as revision 3717 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index fd84f89684..9f82fb1c04 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -220,17 +220,12 @@ static void idct(DCTELEM block[64]){
}
static void init_vlcs(FourXContext *f){
- static int done = 0;
int i;
- if (!done) {
- done = 1;
-
- for(i=0; i<4; i++){
- init_vlc(&block_type_vlc[i], BLOCK_TYPE_VLC_BITS, 7,
- &block_type_tab[i][0][1], 2, 1,
- &block_type_tab[i][0][0], 2, 1);
- }
+ for(i=0; i<4; i++){
+ init_vlc(&block_type_vlc[i], BLOCK_TYPE_VLC_BITS, 7,
+ &block_type_tab[i][0][1], 2, 1,
+ &block_type_tab[i][0][0], 2, 1, 1);
}
}
@@ -544,7 +539,7 @@ static uint8_t *read_huffman_tables(FourXContext *f, uint8_t * const buf){
init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257,
len_tab , 1, 1,
- bits_tab, 4, 4);
+ bits_tab, 4, 4, 0);
return ptr;
}