From: Mathis Rosenhauer Date: Mon, 12 Aug 2013 14:41:47 +0000 (+0200) Subject: se_table now has static size X-Git-Tag: accepted/tizen/5.0/unified/20181102.025501~141 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8286da3836bc8ed8613506ad17d6292c24e9b57;p=platform%2Fupstream%2Flibaec.git se_table now has static size --- diff --git a/src/decode.c b/src/decode.c index 3476550..45f44a3 100644 --- a/src/decode.c +++ b/src/decode.c @@ -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; diff --git a/src/decode.h b/src/decode.h index 525f90d..db4a0a2 100644 --- a/src/decode.h +++ b/src/decode.h @@ -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 */