laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38331?usp=email )
Change subject: trau: detect 8k AMR 7.40k frames correctly for decoding ......................................................................
trau: detect 8k AMR 7.40k frames correctly for decoding
osmo_trau_frame_decode_8k() detects different possible frame structures by their sync pattern bits. The distinctive sync pattern of AMR 7.40k format was checked incorrectly, thereby precluding decoding of such frames.
Change-Id: Iad527d4141cf4d76feea56399ea1916813e1e941 --- M src/trau/trau_frame.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve
diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c index 966c794..8347303 100644 --- a/src/trau/trau_frame.c +++ b/src/trau/trau_frame.c @@ -1454,7 +1454,7 @@ /*!< check sync pattern for AMR 7.4kBit/s */ static bool is_amr_74(const ubit_t *bits) { - if (bits[0] != 0 || bits[1] != 0 || bits[2] != 0) + if (bits[0] != 0 || bits[1] != 0 || bits[2] != 1) return false; if (bits[8] != 0) return false;