summaryrefslogtreecommitdiff
path: root/src/decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decode.c b/src/decode.c
index f3b94e8..d89eb2d 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -715,11 +715,11 @@ int aec_decode_init(struct aec_stream *strm)
}
if (strm->flags & AEC_DATA_SIGNED) {
- state->xmin = -(INT64_C(1) << (strm->bits_per_sample - 1));
- state->xmax = (UINT64_C(1) << (strm->bits_per_sample - 1)) - 1;
+ state->xmax = UINT32_MAX >> (32 - strm->bits_per_sample + 1);
+ state->xmin = ~state->xmax;
} else {
state->xmin = 0;
- state->xmax = (UINT64_C(1) << strm->bits_per_sample) - 1;
+ state->xmax = UINT32_MAX >> (32 - strm->bits_per_sample);
}
state->in_blklen = (strm->block_size * strm->bits_per_sample