diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 7dac0d3982..d66718095d 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -492,22 +492,23 @@ static uint8_t *read_huffman_tables(FourXContext *f, uint8_t * const buf){ // printf("%2X", ptr[j]); for(j=257; j<512; j++){ - int smallest[2]= {-1,-1}; + int min_freq[2]= {256*256, 256*256}; + int smallest[2]= {0, 0}; int i; for(i=0; igb, buf + 4, 8*bitstream_size); prestream_size= length + buf - prestream; - + f->bitstream_buffer= av_fast_realloc(f->bitstream_buffer, &f->bitstream_buffer_size, prestream_size + FF_INPUT_BUFFER_PADDING_SIZE); f->dsp.bswap_buf((uint32_t*)f->bitstream_buffer, (uint32_t*)prestream, prestream_size/4); init_get_bits(&f->pre_gb, f->bitstream_buffer, 8*prestream_size);