]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_amr, mod_amrwb] Increase AMR-NB and AMR-WB max decode buffer size by one byte
authorPatty Watson <pattylee.watson@outlook.com>
Wed, 11 Jun 2025 21:13:52 +0000 (17:13 -0400)
committerGitHub <noreply@github.com>
Wed, 11 Jun 2025 21:13:52 +0000 (00:13 +0300)
Co-authored-by: Patty Watson <patty.watson@ryzyliant.com>
src/mod/codecs/mod_amr/mod_amr.c
src/mod/codecs/mod_amrwb/mod_amrwb.c

index 0769f62f3aa0cc9995172e08fd0fbe6c7f7cd949..37f41c27e98b24d710fca5d9eadba638c2592c74 100644 (file)
@@ -142,7 +142,7 @@ static struct {
 
 const int switch_amr_frame_sizes[] = {12,13,15,17,19,20,26,31,5,0,0,0,0,0,0,1};
 
-#define SWITCH_AMR_OUT_MAX_SIZE 32
+#define SWITCH_AMR_OUT_MAX_SIZE 33
 #define SWITCH_AMR_MODES 9 /* plus SID */
 
 static switch_bool_t switch_amr_unpack_oa(unsigned char *buf, uint8_t *tmp, int encoded_data_len)
index d89ec5d62bbe0d9c72e3cc09c316658cb512654d..ebad893168e14553732d6b3e2f061b3250c72680 100644 (file)
@@ -94,7 +94,7 @@ static struct {
 
 const int switch_amrwb_frame_sizes[] = {17, 23, 32, 36, 40, 46, 50, 58, 60, 5, 0, 0, 0, 0, 1, 1};
 
-#define SWITCH_AMRWB_OUT_MAX_SIZE 61
+#define SWITCH_AMRWB_OUT_MAX_SIZE 62
 #define SWITCH_AMRWB_MODES 10 /* Silence Indicator (SID) included */
 
 #define invalid_frame_type (index > SWITCH_AMRWB_MODES && index != 0xe && index != 0xf) /* include SPEECH_LOST and NO_DATA*/