diff libmpcodecs/ad_faad.c @ 15978:c8dc500e078e

memcpy and memmove both copy memory, but when using memcpy the source and destination must not overlap, but here, they did overlap. Committed with the kind blessing of Richard, patch by uau
author gpoirier
date Fri, 15 Jul 2005 22:09:30 +0000
parents bdb826438aa8
children 6a9283411dfe
line wrap: on
line diff
--- a/libmpcodecs/ad_faad.c	Fri Jul 15 17:55:42 2005 +0000
+++ b/libmpcodecs/ad_faad.c	Fri Jul 15 22:09:30 2005 +0000
@@ -238,7 +238,7 @@
       sh->a_in_buffer_len=0;
     } else {
       sh->a_in_buffer_len-=faac_finfo.bytesconsumed;
-      memcpy(sh->a_in_buffer,&sh->a_in_buffer[faac_finfo.bytesconsumed],sh->a_in_buffer_len);
+      memmove(sh->a_in_buffer,&sh->a_in_buffer[faac_finfo.bytesconsumed],sh->a_in_buffer_len);
     }
 
     if(faac_finfo.error > 0) {