This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. Change subject: DTX: fix AMR SID-FIRST detection ...................................................................... DTX: fix AMR SID-FIRST detection Max's note: adjusted test output. Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc Related: OS#1801 --- M src/codec/gsm690.c M tests/codec/codec_test.ok 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index c3cb932..b273f0f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -215,7 +215,7 @@ }; 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 @@ 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) diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok index 2af7cc7..80c4a09 100644 --- a/tests/codec/codec_test.ok +++ b/tests/codec/codec_test.ok @@ -1,6 +1,6 @@ AMR RTP payload decoder test: -[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST [2] encode [0] -[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE [2] encode [0] +[9] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST [9] encode [0] +[9] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE [9] encode [0] [2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 [2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 [33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 -- To view, visit https://gerrit.osmocom.org/1552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jean-Francois Dionne <jf.dionne at nutaq.com> Gerrit-Reviewer: Jenkins Builder