diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2003-08-24 22:01:33 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2003-08-24 22:01:33 +0000 |
commit | 228ef9dde15625e21daa247e6a832d05c041b2a9 (patch) | |
tree | 54c59e4e2a15438ec11410ade916794a5b6eae2b | |
parent | 758cf534f533c9b5ac5ade35ebe9c7b8b88f1119 (diff) | |
download | ffmpeg-streaming-228ef9dde15625e21daa247e6a832d05c041b2a9.zip ffmpeg-streaming-228ef9dde15625e21daa247e6a832d05c041b2a9.tar.gz |
memmove fixes (Jon Burgess)
Originally committed as revision 2157 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegaudiodec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 1d1074a..d96bf67 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1460,7 +1460,7 @@ static void seek_to_maindata(MPADecodeContext *s, unsigned int backstep) uint8_t *ptr; /* compute current position in stream */ - ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3); + ptr = (uint8_t *)(s->gb.buffer + (get_bits_count(&s->gb)>>3)); /* copy old data before current one */ ptr -= backstep; @@ -2376,7 +2376,7 @@ static int decode_frame(AVCodecContext * avctx, if (check_header(header) < 0) { /* no sync found : move by one byte (inefficient, but simple!) */ - memcpy(s->inbuf, s->inbuf + 1, s->inbuf_ptr - s->inbuf - 1); + memmove(s->inbuf, s->inbuf + 1, s->inbuf_ptr - s->inbuf - 1); s->inbuf_ptr--; dprintf("skip %x\n", header); /* reset free format frame size to give a chance @@ -2402,7 +2402,7 @@ static int decode_frame(AVCodecContext * avctx, if (len == 0) { /* frame too long: resync */ s->frame_size = 0; - memcpy(s->inbuf, s->inbuf + 1, s->inbuf_ptr - s->inbuf - 1); + memmove(s->inbuf, s->inbuf + 1, s->inbuf_ptr - s->inbuf - 1); s->inbuf_ptr--; } else { uint8_t *p, *pend; |