[MPlayer-dev-eng] [PATCH] memmove needed instead of memcpy

Sidik Isani lksi at cfht.hawaii.edu
Sun Sep 22 18:14:05 CEST 2002


Hello -

  Sorry to be posting so much.  If I have more little stuff, I'll
  save them up from now on.  The memcpy() in mplayer.c needs to be
  a memmove().  Otherwise when buffers overlap little sound glitches
  can occur.

Be seeing you,

- Sidik
-------------- next part --------------
diff -ru MPlayer-cvs/mplayer.c MPlayer-memmove/mplayer.c
--- MPlayer-cvs/mplayer.c	Sat Sep 21 17:59:29 2002
+++ MPlayer-memmove/mplayer.c	Sun Sep 22 06:08:38 2002
@@ -1509,7 +1509,7 @@
 
   if(playsize>0){
       sh_audio->a_buffer_len-=playsize;
-      memcpy(sh_audio->a_buffer,&sh_audio->a_buffer[playsize],sh_audio->a_buffer_len);
+      memmove(sh_audio->a_buffer,&sh_audio->a_buffer[playsize],sh_audio->a_buffer_len);
       sh_audio->timer+=playsize/(float)(sh_audio->o_bps);
   }
 


More information about the MPlayer-dev-eng mailing list