[FFmpeg-cvslog] g723.1: use memmove() where overlapping src and dst can happen.

Michael Niedermayer git at videolan.org
Tue Oct 11 13:57:13 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Oct 11 13:45:49 2011 +0200| [5174032953dabb3ab2eb3a5c1bf6934b5b79c3c9] | committer: Michael Niedermayer

g723.1: use memmove() where overlapping src and dst can happen.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5174032953dabb3ab2eb3a5c1bf6934b5b79c3c9
---

 libavcodec/g723_1.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 9970d90..e1dc431 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -2179,7 +2179,7 @@ static int g723_1_encode_frame(AVCodecContext *avctx, unsigned char *buf,
         gen_acb_excitation(impulse_resp, p->prev_excitation, p->pitch_lag[i >> 1],
                            p->subframe[i], Rate6k3);
 
-        memcpy(p->prev_excitation, p->prev_excitation + SUBFRAME_LEN,
+        memmove(p->prev_excitation, p->prev_excitation + SUBFRAME_LEN,
                sizeof(int16_t) * (PITCH_MAX - SUBFRAME_LEN));
         for (j = 0; j < SUBFRAME_LEN; j++)
             in[j] = av_clip_int16((in[j] << 1) + impulse_resp[j]);



More information about the ffmpeg-cvslog mailing list