mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: don't error on 0 decode length
It can happen for the first frame when the codec is filling up.
This commit is contained in:
parent
a592eb60a8
commit
635a378ca4
1 changed files with 6 additions and 3 deletions
|
|
@ -400,7 +400,7 @@ static void a2dp_on_ready_read(struct spa_source *source)
|
|||
if (size_read == 0)
|
||||
return;
|
||||
if (size_read < 0) {
|
||||
spa_log_error(this->log, "failed to read data");
|
||||
spa_log_error(this->log, "failed to read data: %s", spa_strerror(size_read));
|
||||
goto stop;
|
||||
}
|
||||
spa_log_debug(this->log, "read socket data %d", size_read);
|
||||
|
|
@ -408,10 +408,13 @@ static void a2dp_on_ready_read(struct spa_source *source)
|
|||
/* decode */
|
||||
decoded = decode_data(this, this->buffer_read, size_read,
|
||||
read_decoded, sizeof (read_decoded));
|
||||
if (decoded <= 0) {
|
||||
spa_log_error(this->log, "failed to decode data");
|
||||
if (decoded < 0) {
|
||||
spa_log_error(this->log, "failed to decode data: %d", decoded);
|
||||
goto stop;
|
||||
}
|
||||
if (decoded == 0)
|
||||
return;
|
||||
|
||||
spa_log_debug(this->log, "decoded socket data %d", decoded);
|
||||
|
||||
/* discard when not started */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue