From 2734a066c272c65412c2cc12e948f7dfc81c3462 Mon Sep 17 00:00:00 2001 From: Alex Narest Date: Wed, 11 Apr 2018 13:49:33 +0200 Subject: [PATCH] Fix neteq_rtpplay crash in case new concealment event does not have voice concealed smaples Bug: webrtc:9114 Change-Id: I97a55a780384e6a710fdeb286124eea642000dc8 Reviewed-on: https://webrtc-review.googlesource.com/69240 Reviewed-by: Henrik Lundin Commit-Queue: Alex Narest Cr-Commit-Position: refs/heads/master@{#22837} --- modules/audio_coding/neteq/tools/neteq_rtpplay.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/modules/audio_coding/neteq/tools/neteq_rtpplay.cc index 8c1fa38c47..1620ebde6c 100644 --- a/modules/audio_coding/neteq/tools/neteq_rtpplay.cc +++ b/modules/audio_coding/neteq/tools/neteq_rtpplay.cc @@ -370,7 +370,9 @@ class StatsGetter : public NetEqGetAudioCallback { stats_.push_back(stats); } const auto lifetime_stat = neteq->GetLifetimeStatistics(); - if (current_concealment_event_ != lifetime_stat.concealment_events) { + if (current_concealment_event_ != lifetime_stat.concealment_events && + voice_concealed_samples_until_last_event_ < + lifetime_stat.voice_concealed_samples) { if (last_event_end_time_ms_ > 0) { // Do not account for the first event to avoid start of the call // skewing.