FreeCalypso > hg > gsm-codec-lib
changeset 605:63f774192906
gsmhr_decoder_twts002_in(): set BFI=1 SID=1 for invalid SID
When a received TW-TS-002 RTP payload indicates invalid SID,
which of the 3 possible BFI/SID combinations should we pass to
our internal ETSI-based speech decoder or TFO engine?
Our original code passed BFI=0 SID=1, but upon further reflection,
BFI=1 SID=1 is a better choice. In the corner case where received
invalid SID is fed to a full decoder in homed state, setting BFI=1
allows that decoder to emit zeros on PCM and stay homed, instead of
launching into full decoding.
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Thu, 04 Dec 2025 21:01:46 +0000 |
| parents | 54f0f1b74c25 |
| children | bc57dcfa91d0 |
| files | libgsmhr1/twts002_in.c |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libgsmhr1/twts002_in.c Thu Dec 04 19:40:35 2025 +0000 +++ b/libgsmhr1/twts002_in.c Thu Dec 04 21:01:46 2025 +0000 @@ -23,7 +23,7 @@ break; case 1: memset(params, 0, sizeof(int16_t) * GSMHR_NUM_PARAMS); - params[18] = 0; /* BFI */ + params[18] = 1; /* BFI */ params[20] = 1; /* SID */ break; case 2:
