RTP: Add log throttle for "no data".
Change-Id: I14d9886a40fa780514cbc6c5bac6fb2a670f55f4
diff --git a/voip/jni/rtp/AudioGroup.cpp b/voip/jni/rtp/AudioGroup.cpp
index 726e98b..7cf06137 100644
--- a/voip/jni/rtp/AudioGroup.cpp
+++ b/voip/jni/rtp/AudioGroup.cpp
@@ -104,6 +104,7 @@
int mSampleRate;
int mSampleCount;
int mInterval;
+ int mLogThrottle;
int16_t *mBuffer;
int mBufferMask;
@@ -278,7 +279,10 @@
chain = chain->mNext;
}
if (!mixed) {
- LOGD("stream[%d] no data", mSocket);
+ if ((mTick ^ mLogThrottle) >> 10) {
+ mLogThrottle = mTick;
+ LOGD("stream[%d] no data", mSocket);
+ }
return;
}