mirror of https://github.com/mpv-player/mpv
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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15979 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8193457966
commit
d9a3f81b3e
|
@ -238,7 +238,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue