Henrik Lundin 05f71fcb61 NetEq: 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

Review URL: https://codereview.webrtc.org/1324453002 .

Cr-Commit-Position: refs/heads/master@{#9828}
2015-09-01 09:52:06 +00:00
2015-05-21 11:25:15 +00:00
2014-06-17 08:54:03 +00:00
Description
No description provided
255 MiB
Languages
C++ 88.6%
C 3.3%
Java 3%
Objective-C++ 1.9%
Python 1.9%
Other 1%