mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04: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
89edb9f6c5
commit
cdc150a2c3
1 changed files with 1 additions and 1 deletions
|
|
@ -5356,7 +5356,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