aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-28 13:46:21 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-28 20:58:10 +0200
commitfa93cec8a145eed684c6a9ce3764f8d213756366 (patch)
treef03666168253a953b29868fdc51fcc8e5049fe5c
parentac3517e715d31b5d2046e46ec578cc8573eff305 (diff)
EFR codec fixup.
While EFR has a canonical format of 31 bytes, the codec_efr.c *does not* use that canonical format as input. Rather, it uses the format of .amr files with a 0x3C header as first byte. So the resulting encode/decode functions should not assume 31 bytes, but 32 bytes.
-rw-r--r--src/codec_efr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codec_efr.c b/src/codec_efr.c
index 877a9eb..339172a 100644
--- a/src/codec_efr.c
+++ b/src/codec_efr.c
@@ -84,7 +84,7 @@ codec_efr_encode(void *state, uint8_t *cod, const uint8_t *pcm, unsigned int pcm
if (rv != 32)
return -1;
- return EFR_CANON_LEN;
+ return 32;
}
static int
@@ -92,7 +92,7 @@ codec_efr_decode(void *state, uint8_t *pcm, const uint8_t *cod, unsigned int cod
{
struct codec_efr_state *st = state;
- assert(cod_len == EFR_CANON_LEN);
+ assert(cod_len == 32);
BENCHMARK_START;
Decoder_Interface_Decode(
st->decoder,