mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
netjack2: copy large midi events to the end of the buffer
There is no need to keep an extra free byte at the end and it will cause us to lose a byte when we copy the large midi events down.
This commit is contained in:
parent
795e917716
commit
3be88eacb8
1 changed files with 1 additions and 1 deletions
|
|
@ -263,7 +263,7 @@ static inline void *n2j_midi_buffer_reserve(struct nj2_midi_buffer *buf,
|
|||
if (used_size + size > buf->buffer_size)
|
||||
return NULL;
|
||||
buf->write_pos += size;
|
||||
ev->offset = buf->buffer_size - 1 - buf->write_pos;
|
||||
ev->offset = buf->buffer_size - buf->write_pos;
|
||||
ptr = SPA_PTROFF(buf, ev->offset, void);
|
||||
}
|
||||
buf->event_count++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue