mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-17 07:00:03 -05:00
jack: copy events to right offset
The larger events need to be copied into the target buffer at the same offset as the source buffer or else we overwrite the header and make a corrupt buffer.
This commit is contained in:
parent
8eb93b4879
commit
412b379138
1 changed files with 1 additions and 1 deletions
|
|
@ -5271,7 +5271,7 @@ static void *get_buffer_input_midi(struct port *p, jack_nframes_t frames)
|
|||
* sizeof(struct midi_event)));
|
||||
if (mb->write_pos) {
|
||||
size_t offs = mb->buffer_size - 1 - mb->write_pos;
|
||||
memcpy(ptr, SPA_PTROFF(mb, offs, void), mb->write_pos);
|
||||
memcpy(SPA_PTROFF(ptr, offs, void), SPA_PTROFF(mb, offs, void), mb->write_pos);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue