Skip to content

Commit 92ca429

Browse files
pwatson-ott2Patty Watson
andauthored
[mod_amr, mod_amrwb] Increase AMR-NB and AMR-WB max decode buffer size by one byte
Co-authored-by: Patty Watson <[email protected]>
1 parent b97bc60 commit 92ca429

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/mod/codecs/mod_amr/mod_amr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static struct {
142142

143143
const int switch_amr_frame_sizes[] = {12,13,15,17,19,20,26,31,5,0,0,0,0,0,0,1};
144144

145-
#define SWITCH_AMR_OUT_MAX_SIZE 32
145+
#define SWITCH_AMR_OUT_MAX_SIZE 33
146146
#define SWITCH_AMR_MODES 9 /* plus SID */
147147

148148
static switch_bool_t switch_amr_unpack_oa(unsigned char *buf, uint8_t *tmp, int encoded_data_len)

src/mod/codecs/mod_amrwb/mod_amrwb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static struct {
9494

9595
const int switch_amrwb_frame_sizes[] = {17, 23, 32, 36, 40, 46, 50, 58, 60, 5, 0, 0, 0, 0, 1, 1};
9696

97-
#define SWITCH_AMRWB_OUT_MAX_SIZE 61
97+
#define SWITCH_AMRWB_OUT_MAX_SIZE 62
9898
#define SWITCH_AMRWB_MODES 10 /* Silence Indicator (SID) included */
9999

100100
#define invalid_frame_type (index > SWITCH_AMRWB_MODES && index != 0xe && index != 0xf) /* include SPEECH_LOST and NO_DATA*/

0 commit comments

Comments
 (0)