mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Avoid zero duration packets in NetEq test with replacement audio.
Fixes a crash when the timestamp difference between two packets is zero, which can happen due to probing for example. Bug: none Change-Id: If04dfaed0b10aecd7b1a1e5487161c2d82ad9e44 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338020 Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Reviewed-by: Henrik Lundin <hlundin@google.com> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41669}
This commit is contained in:
parent
5b90b963de
commit
5ff04d1b60
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ void NetEqReplacementInput::ReplacePacket() {
|
|||
next_hdr->timestamp - packet_->header.timestamp;
|
||||
const bool opus_dtx = packet_->payload.size() <= 2;
|
||||
if (next_hdr->sequenceNumber == packet_->header.sequenceNumber + 1 &&
|
||||
timestamp_diff <= 120 * 48 && !opus_dtx) {
|
||||
timestamp_diff <= 120 * 48 && timestamp_diff > 0 && !opus_dtx) {
|
||||
// Packets are in order and the timestamp diff is less than 5760 samples.
|
||||
// Accept the timestamp diff as a valid frame size.
|
||||
input_frame_size_timestamps = timestamp_diff;
|
||||
|
|
Loading…
Reference in a new issue