Commit 436a98a5 authored by Igor Kovalenko's avatar Igor Kovalenko Committed by PulseAudio Marge Bot
Browse files

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: <!507>
parent 436813d8
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment