Commit d8286da3 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

se_table now has static size

parent c8069f42
......@@ -637,10 +637,6 @@ int aec_decode_init(struct aec_stream *strm)
if (state == NULL)
return AEC_MEM_ERROR;
state->se_table = malloc(182 * sizeof(int));
if (state->se_table == NULL)
return AEC_MEM_ERROR;
create_se_table(state->se_table);
strm->state = state;
......@@ -748,7 +744,6 @@ int aec_decode_end(struct aec_stream *strm)
struct internal_state *state = strm->state;
free(state->id_table);
free(state->se_table);
free(state->rsi_buffer);
free(state);
return AEC_OK;
......
......@@ -87,12 +87,12 @@ struct internal_state {
int ref; /* 1 if current block has reference sample */
int pp; /* 1 if postprocessor has to be used */
int bytes_per_sample; /* storage size of samples in bytes */
int *se_table; /* table for decoding second extension option */
uint32_t *rsi_buffer; /* output buffer holding one reference
sample interval */
uint32_t *rsip; /* current position of output in rsi_buffer */
size_t rsi_size; /* rsi in bytes */
uint32_t *flush_start; /* first not yet flushed byte in rsi_buffer */
int se_table[182]; /* table for decoding second extension option */
} decode_state;
#endif /* DECODE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment