mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-21 05:33:49 -04:00
bluez5: media-source: don't crash if BAP streams doesn't have iso_io
Don't crash in update_target_latency() if a BAP stream doesn't have iso_io for some reason.
This commit is contained in:
parent
1dd8729d13
commit
3dff64364f
1 changed files with 2 additions and 2 deletions
|
|
@ -1784,7 +1784,7 @@ static uint32_t get_samples(struct impl *this, int64_t *duration_ns)
|
|||
static void update_target_latency(struct impl *this)
|
||||
{
|
||||
struct port *port = &this->port;
|
||||
int32_t target;
|
||||
int32_t target = 0;
|
||||
int samples;
|
||||
|
||||
if (this->transport == NULL || !port->have_format)
|
||||
|
|
@ -1803,7 +1803,7 @@ static void update_target_latency(struct impl *this)
|
|||
*/
|
||||
if (this->decode_buffer_target)
|
||||
target = this->decode_buffer_target;
|
||||
else
|
||||
else if (this->transport->iso_io)
|
||||
target = spa_bt_iso_io_get_source_target_latency(this->transport->iso_io);
|
||||
|
||||
spa_bt_decode_buffer_set_target_latency(&port->buffer, target);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue