Skip to content

Commit

Permalink
pipewire: add version guard for pw_stream.requested
Browse files Browse the repository at this point in the history
  • Loading branch information
mmitch committed Feb 2, 2024
1 parent 7bd9941 commit 7d0e5e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugout_pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,12 @@ static ssize_t pipewire_write(const void *buf, size_t count)

// check how much we can send
n_frames = spa_buf->datas[0].maxsize / STRIDE;
#if PW_CHECK_VERSION(0,3,49)
// unfortunately our CI pipeline runs Ubuntu 22.04LTS
// which is on 0.3.48, so we have to do this version check
if (b->requested)
n_frames = SPA_MIN((int)b->requested, n_frames);
#endif
n_frames = SPA_MIN(n_frames, frames_to_send);
bytes_to_send = n_frames * STRIDE;

Expand Down

0 comments on commit 7d0e5e0

Please sign in to comment.