[MPlayer-cvslog] r33063 - trunk/mencoder.c

ranma subversion at mplayerhq.hu
Wed Mar 9 22:18:25 CET 2011


Author: ranma
Date: Wed Mar  9 22:18:25 2011
New Revision: 33063

Log:
Use memmove when source and destination can overlap.

Modified:
   trunk/mencoder.c

Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c	Wed Mar  9 16:36:10 2011	(r33062)
+++ trunk/mencoder.c	Wed Mar  9 22:18:25 2011	(r33063)
@@ -300,7 +300,7 @@ static int dec_audio(sh_audio_t *sh_audi
 		fast_memcpy(buffer+size,sh_audio->a_out_buffer,len);
 		sh_audio->a_out_buffer_len-=len; size+=len;
 		if(sh_audio->a_out_buffer_len>0)
-		    fast_memcpy(sh_audio->a_out_buffer,&sh_audio->a_out_buffer[len],sh_audio->a_out_buffer_len);
+		    memmove(sh_audio->a_out_buffer,&sh_audio->a_out_buffer[len],sh_audio->a_out_buffer_len);
     }
     return size;
 }
@@ -1382,7 +1382,7 @@ if(sh_audio){
 	    mux_a->wf->nAvgBytesPerSec=0.5f+(double)mux_a->size/a_muxer_time; // avg bps (VBR)
 	if(mux_a->buffer_len>=len){
 	    mux_a->buffer_len-=len;
-	    fast_memcpy(mux_a->buffer,mux_a->buffer+len,mux_a->buffer_len);
+	    memmove(mux_a->buffer,mux_a->buffer+len,mux_a->buffer_len);
 	}
 
 


More information about the MPlayer-cvslog mailing list