falconia submitted this change.
trau_frame: fix 8k decoding
osmo_trau_frame_decode_8k() API was broken for most TRAU frame types:
the processing begins with identifying the sync pattern, but the check
for the leading 8 zeros in HRv1, AMR-low and AMR-6k7 formats was
broken in that it was checking for 16 zero bits instead of 8.
While at it, fix global namespace pollution: the bit8_0[] datum
used in this logic was defined as global when it should be static.
Change-Id: Idabc1283d477473b479f2d76d783ca9aeaf0af5d
---
M src/trau/trau_frame.c
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c
index 389495c..98e26da 100644
--- a/src/trau/trau_frame.c
+++ b/src/trau/trau_frame.c
@@ -1360,7 +1360,7 @@
#define TRAU8_FT_AMR_NO_SPEECH_CMR 0x14 /* 1, 0, 1, 0, 0 */
#define TRAU8_FT_AMR_475_515_590 0..7
-const uint8_t bit8_0[16] = { 0, };
+static const uint8_t bit8_0[8] = { 0, };
/*!< check sync pattern for hr/data/oam */
static bool is_hr(const ubit_t *bits)
To view, visit change 37286. To unsubscribe, or for help writing mail filters, visit settings.