diff options
author | bodamnam <bodamnam@google.com> | 2023-03-29 09:36:00 +0000 |
---|---|---|
committer | bodamnam <bodamnam@google.com> | 2023-03-29 11:49:57 +0000 |
commit | 7bd2a617bc4658fa9c4b14a0d1eeda86ae9ebfd6 (patch) | |
tree | bd2322b77679d4d057ea0f6a16f4f4a7bfe74ff2 | |
parent | 079ac227d80cbfe1ab72f4f03abf2a91ac283c3b (diff) | |
download | ImsMedia-7bd2a617bc4658fa9c4b14a0d1eeda86ae9ebfd6.tar.gz |
Fix the infinite loop error in AudioJitterBuffer
There is an issue when the AudioJitterBuffer invoke resync method if the time difference is not fix to any statement in the loop in condition of the audio frame is SID and the time difference lower than current jitter buffer size minus 20msec.
I fix the infinite loop problem to add escape.
Bug: 275635779
Test: Verified multiple voice call test in live network
Change-Id: I0a6a47f81444219b1fdf561fa69d080dba4ac5d1
-rw-r--r-- | service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioJitterBuffer.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioJitterBuffer.cpp b/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioJitterBuffer.cpp index 64890329..98bf8014 100644 --- a/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioJitterBuffer.cpp +++ b/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioJitterBuffer.cpp @@ -608,19 +608,15 @@ bool AudioJitterBuffer::Resync(uint32_t currentTime) } else { - if (!IsSID(entry->nBufferSize)) - { - // the first voice frame - mCurrPlayingTS = entry->nTimestamp; - IMLOGD2("[Resync] currTs[%d], delay[%d]", mCurrPlayingTS, timeDiff); - return true; - } - else if (timeDiff > (mCurrJitterBufferSize - 1) * FRAME_INTERVAL) + if (!IsSID(entry->nBufferSize) || + timeDiff > (mCurrJitterBufferSize - 1) * FRAME_INTERVAL) { mCurrPlayingTS = entry->nTimestamp; IMLOGD2("[Resync] currTs[%d], delay[%d]", mCurrPlayingTS, timeDiff); return true; } + + break; } } |