mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 09:29:29 +00:00
src and dest buffers may overlap
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7716 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a8b287fead
commit
76f2518aa8
@ -103,7 +103,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data)
|
||||
// Copy beginning of buffer to beginning of output buffer
|
||||
memcpy(l->audio,s->buf,c->len);
|
||||
// Move buffer left
|
||||
memcpy(s->buf,s->buf+c->len,s->len-c->len);
|
||||
memmove(s->buf,s->buf+c->len,s->len-c->len);
|
||||
// Save away current audio to end of buffer
|
||||
memcpy(s->buf+s->len-c->len,c->audio,c->len);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user