mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
bluetooth: produce silence on mSBC decoding error
We are supposed to conceal packet loss. This is not trivial but we can at least produce silence instead of breaking on mSBC decoding error. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
This commit is contained in:
parent
436813d8a8
commit
436a98a50b
1 changed files with 4 additions and 2 deletions
|
|
@ -287,9 +287,11 @@ static size_t decode_buffer(void *codec_info, const uint8_t *input_buffer, size_
|
|||
|
||||
if (PA_UNLIKELY(decoded <= 0)) {
|
||||
pa_log_error("mSBC decoding error (%li)", (long) decoded);
|
||||
*processed = 0;
|
||||
return 0;
|
||||
pa_silence_memory(output_buffer, sbc_info->codesize, &sbc_info->sample_spec);
|
||||
decoded = sbc_info->frame_length;
|
||||
written = sbc_info->codesize;
|
||||
}
|
||||
|
||||
pa_assert_fp((size_t)decoded == sbc_info->frame_length);
|
||||
pa_assert_fp((size_t)written == sbc_info->codesize);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue