From e67cc7346387c0bf27bd9606ebfca2f550d59bcd Mon Sep 17 00:00:00 2001 From: DeeJayLSP Date: Tue, 27 Aug 2024 23:56:26 -0300 Subject: Fix memory leak on QOA import --- thirdparty/misc/qoa.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'thirdparty/misc/qoa.h') diff --git a/thirdparty/misc/qoa.h b/thirdparty/misc/qoa.h index c890b88bd6..23612bb0bf 100644 --- a/thirdparty/misc/qoa.h +++ b/thirdparty/misc/qoa.h @@ -394,9 +394,9 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned #ifdef QOA_RECORD_TOTAL_ERROR qoa_uint64_t best_error = -1; #endif - qoa_uint64_t best_slice = -1; - qoa_lms_t best_lms = {{-1, -1, -1, -1}, {-1, -1, -1, -1}}; - int best_scalefactor = -1; + qoa_uint64_t best_slice = 0; + qoa_lms_t best_lms = {}; + int best_scalefactor = 0; for (int sfi = 0; sfi < 16; sfi++) { /* There is a strong correlation between the scalefactors of -- cgit v1.2.3