commit | 398f8811bb8a2f266e9c28090fc46b8d63628371 | [log] [tgz] |
---|---|---|
author | Marie Janssen <jamuraa@google.com> | Mon Oct 26 18:11:09 2020 +0000 |
committer | CQ Bot <commit-bot@chromium.org> | Mon Oct 26 18:11:09 2020 +0000 |
tree | f01260dabeb7e6c1892088474f625f36c51996db | |
parent | 80930fd7679482fe0eeb82575d8714b320432471 [diff] |
[bt][a2dp-source] Fix panic in encoding task When the encoding AsyncWrite only had enough room for part of a buffer, the encoding stream process would mark in the buffer where to resume, push the buffer back on the queue, and then return to the top of the loop to re-poll to register the waker. The top of the loop would pop off the current buffer, and drop it on the floor when it got a Poll::Pending. This would also happen whenever the AsyncWrite for the encoder was stalled, so we were also just occassionally dropping packets when the encoder could take no packets. Retain the buffer when we get Pending from the AsyncWrite. Make the EncodedStream a bit more generic, and add a build_test which doesn't require a StreamProcessor to operate the stream, making it testable. Fixed: fxbug.dev/62547 Test: added test_stalled_encoder_input in bt-a2dp-source-tests Change-Id: I9214dc415ce533f30a9325ce6686bc2fd5eb25fd Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/442996 Commit-Queue: Marie Janssen 💖 <jamuraa@google.com> Reviewed-by: Austin Foxley <afoxley@google.com> Testability-Review: Austin Foxley <afoxley@google.com>
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.