Skip to content

Commit

Permalink
Fix #2116: iLBC using memcpy instead of memmove for overlapping memory.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5798 74dad513-b988-da41-8d7b-12977e46ad98
  • Loading branch information
trengginas committed May 29, 2018
1 parent 09a206c commit 18f5bc2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions third_party/build/ilbc/notes.txt
@@ -0,0 +1,5 @@
Notes:
* Modify iLBC_decode.c and iLBC_encode.c
- iLBC using memcpy instead of memmove for overlapping memory. This will
cause some weird sound if the call lasted longer than ~30s. To fix this,
some call to memcpy is changed to memmove. Have a look at #2116.
4 changes: 2 additions & 2 deletions third_party/ilbc/iLBC_decode.c
Expand Up @@ -251,7 +251,7 @@

/* update memory */

memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
memmove(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
memcpy(mem+CB_MEML-SUBL,


Expand Down Expand Up @@ -299,7 +299,7 @@

/* update memory */

memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
memmove(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
memcpy(mem+CB_MEML-SUBL,
&reverseDecresidual[subframe*SUBL],
SUBL*sizeof(float));
Expand Down
4 changes: 2 additions & 2 deletions third_party/ilbc/iLBC_encode.c
Expand Up @@ -308,7 +308,7 @@

/* update memory */

memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
memmove(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
memcpy(mem+CB_MEML-SUBL,


Expand Down Expand Up @@ -386,7 +386,7 @@

/* update memory */

memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
memmove(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
memcpy(mem+CB_MEML-SUBL,
&reverseDecresidual[subframe*SUBL],
SUBL*sizeof(float));
Expand Down

0 comments on commit 18f5bc2

Please sign in to comment.