Skip to content
Success

Changes

Summary

  1. trau2rtp FR & EFR: fix uninitialized memory bug (details)
  2. tests: add unit tests for trau2rtp conversion, FR & EFR (details)
Commit f390e8e41d9061e1f7e2d21eea5947ca102440f5 by falcon
trau2rtp FR & EFR: fix uninitialized memory bug

The implementation of osmo_trau2rtp() for FR and EFR speech frames
had this bug: when moving individual bits from TRAU to RTP payload
representation, the code would only set bits in the output buffer,
but never clear them.  The result is correct output only when the
RTP payload buffer has been zeroed prior to calling the function,
garbage otherwise.

OsmoMGW was not affected by this bug because it calls osmo_trau2rtp()
with the output buffer pointed to a freshly allocated msgb, and
msgb allocation in libosmocore memsets buffer memory to zeros.
However, a sane API should not depend on previous content of output
buffer memory, hence the function implementation in libosmotrau
was still in the wrong.

Change-Id: I6e6693e096b920a973c8cc627e94884099d004b5
The file was modifiedsrc/trau/trau_rtp_conv.c
Commit a657a943a4ba3faa15f11362144dc53897ab56d3 by falcon
tests: add unit tests for trau2rtp conversion, FR & EFR

The present set of tests exercises osmo_trau_frame_decode_16k()
and osmo_trau2rtp() functions for frame types of FR speech and
EFR speech.  Both standard (RFC 3551) and TW-TS-001 output modes
are tested.

Change-Id: Ie319900125baa8f20595cac83343771d780a5b4e
The file was addedtests/trau_conv/trau16_efr_twts001.ok
The file was addedtests/trau_conv/trau16_fr.in
The file was modified.gitignore
The file was modifiedtests/testsuite.at
The file was addedtests/trau_conv/trau16_fr_std.ok
The file was modifiedtests/Makefile.am
The file was addedtests/trau_conv/trau16_efr_std.ok
The file was addedtests/trau_conv/trau16_to_rtp.c
The file was addedtests/trau_conv/trau16_efr.in
The file was addedtests/trau_conv/trau16_fr_twts001.ok