Commit 15c041d8 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

Set uncomp_len and ref during init. Important for no PP.

parent 06815d50
......@@ -651,6 +651,7 @@ int aec_decode_init(struct aec_stream *strm)
state = malloc(sizeof(struct internal_state));
if (state == NULL)
return AEC_MEM_ERROR;
memset(state, 0, sizeof(struct internal_state));
create_se_table(state->se_table);
......@@ -729,6 +730,7 @@ int aec_decode_init(struct aec_stream *strm)
if (state->rsi_buffer == NULL)
return AEC_MEM_ERROR;
state->ref = 0;
strm->total_in = 0;
strm->total_out = 0;
......
......@@ -793,6 +793,7 @@ int aec_encode_init(struct aec_stream *strm)
memset(state, 0, sizeof(struct internal_state));
strm->state = state;
state->uncomp_len = strm->block_size * strm->bits_per_sample;
if (strm->bits_per_sample > 16) {
/* 24/32 input bit settings */
......@@ -886,6 +887,7 @@ int aec_encode_init(struct aec_stream *strm)
state->block = state->data_pp;
state->ref = 0;
strm->total_in = 0;
strm->total_out = 0;
state->flushed = 0;
......
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