changeset 1414:5ee7bd7ee76d libavcodec

memmove fixes (Jon Burgess)
author bellard
date Sun, 24 Aug 2003 22:01:33 +0000
parents 724e6477f2a8
children 9a218b289ee0
files mpegaudiodec.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Sun Aug 24 16:00:34 2003 +0000
+++ b/mpegaudiodec.c	Sun Aug 24 22:01:33 2003 +0000
@@ -1460,7 +1460,7 @@
     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 @@
 
 		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 @@
             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;