Avoid wrong parsing of padding length and its use in NetEq simulation.
Bug: b/113648474, webrtc:9730 Change-Id: Ieff7ab8697f5c8742548897a9b452a20b0bd2e7c Reviewed-on: https://webrtc-review.googlesource.com/98461 Commit-Queue: Minyue Li <minyue@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24703}
This commit is contained in:
@ -42,7 +42,15 @@ absl::optional<int64_t> NetEqReplacementInput::NextOutputEventTime() const {
|
||||
|
||||
std::unique_ptr<NetEqInput::PacketData> NetEqReplacementInput::PopPacket() {
|
||||
std::unique_ptr<PacketData> to_return = std::move(packet_);
|
||||
packet_ = source_->PopPacket();
|
||||
while (true) {
|
||||
packet_ = source_->PopPacket();
|
||||
if (!packet_)
|
||||
break;
|
||||
if (packet_->payload.size() > packet_->header.paddingLength) {
|
||||
// Not padding only. Good to go. Skip this packet otherwise.
|
||||
break;
|
||||
}
|
||||
}
|
||||
ReplacePacket();
|
||||
return to_return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user