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 <henrik.lundin@webrtc.org>
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22837}
This commit is contained in:
Alex Narest
2018-04-11 13:49:33 +02:00
committed by Commit Bot
parent a2a9875dc2
commit 2734a066c2

View File

@ -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.