NetEq: Fix a bug in DelayPeakDetector causing asserts to trigger
In some situation, typically when incoming packets were reordered, the
DelayPeakDetector::Update method may be called twice (or more) with
non-zero inter_arrival_time argument, but without the TickTimer object
being updated in between (i.e., packets coming in more or less at the
same time). In these situations, a delay peak may be registered with
zero peak period. This could eventually trigger the DCHECK in
DelayPeakDetector::MaxPeakPeriod().
With this fix, the problem is solved by not registering peaks for which
the TickTimer object has not moved since the last peak.
The problem was originally introduced with
https://codereview.webrtc.org/1921163003.
BUG=webrtc:6021
Review-Url: https://codereview.webrtc.org/2085233002
Cr-Original-Commit-Position: refs/heads/master@{#13257}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: d5f50a1b53f740b7273fc859b6c832af21daa473
2 files changed