summaryrefslogtreecommitdiffstats
path: root/src/codec
diff options
context:
space:
mode:
authorJean-Francois Dionne <jf.dionne@nutaq.com>2017-01-10 10:23:56 +0100
committerHarald Welte <laforge@gnumonks.org>2017-01-10 23:28:12 +0000
commitd02c8af6ccb73a18dba5d09112730246d05c187d (patch)
treefa3408d6ec387386b2b42aa8b22b9757ada74023 /src/codec
parent85908a9c2f218b6665b8e90005b900c74875e806 (diff)
DTX: fix AMR SID-FIRST detection
Max's note: adjusted test output. Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc Related: OS#1801
Diffstat (limited to 'src/codec')
-rw-r--r--src/codec/gsm690.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c
index c3cb9324..b273f0fe 100644
--- a/src/codec/gsm690.c
+++ b/src/codec/gsm690.c
@@ -215,7 +215,7 @@ const uint16_t gsm690_4_75_bitorder[95] = {
};
static const uint8_t amr_len_by_ft[16] = {
- 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0
+ 12, 13, 15, 17, 19, 20, 26, 31, 7, 0, 0, 0, 0, 0, 0, 0
};
const struct value_string osmo_amr_type_names[] = {
@@ -262,7 +262,7 @@ int osmo_amr_rtp_dec(const uint8_t *rtppayload, int payload_len, uint8_t *cmr,
if (rtppayload[1] >> 7)
return -ENOTSUP;
- if (payload_len - 2 < amr_len_by_ft[type])
+ if (payload_len < amr_len_by_ft[type])
return -ENOTSUP;
if (ft)