From f8cbb5069517fb3e2ffe36fc4adc6e9900adda02 Mon Sep 17 00:00:00 2001 From: Geolm Date: Mon, 26 Feb 2024 14:12:33 -0500 Subject: [PATCH] use a local buffer to avoid free --- tests/test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test.c b/tests/test.c index 4612862..1173a02 100644 --- a/tests/test.c +++ b/tests/test.c @@ -15,8 +15,9 @@ TEST adaptive_model(void) const uint32_t data[num_elements] = {0, 0, 15, 15, 15, 15, 3, 3, 2, 1, 15, 15, 15, 15, 15, 0, 0, 0, 8, 3}; const uint8_t reference_compressed_data[9] = {0x0, 0xff, 0xf7,0x33, 0x28, 0x66, 0xe6, 0x3, 0x1f}; + uint8_t buffer[256]; - ac_set_buffer(codec, 1000, NULL); + ac_set_buffer(codec, 256, (uint8_t*)buffer); ac_start_encoder(codec); for(uint32_t i=0; i