DescriptionNetEq: Fixing a corner case with depleted sync buffer
In some cases, the number of samples (per channel) in NetEq's sync
buffer could fall below the allowed minimum (5 samples for narrowband,
scaling for other rates). If the number of samples extracted from the
buffer was smaller than the desired number, an error is
returned. However, if the decoder returns fewer samples than expected,
it could happen that the sync buffer level falls under the minimum,
but enough samples are extracted. This triggered an assert. With this
change, the minimum level of the sync buffer is always enforced.
A test is implemented to trigger the problem. It made the assert fire
without this fix, but it now passes.
BUG=webrtc:4840
R=minyue@webrtc.org
Committed: https://chromium.googlesource.com/external/webrtc/+/05f71fcb61df680ab0e0dab06ed6578ce062fa21
Patch Set 1 #
Total comments: 3
Patch Set 2 : Adding a DCHECK #
Messages
Total messages: 15 (5 generated)
|