From 5616abadf581351b9eb1866b0f89c970be61962e Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Thu, 27 Jun 2013 19:47:40 +0000 Subject: [PATCH] Suppress excessive logging in video_coding Only prints the warning message if a frame was dropped. R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1735004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4278 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/video_coding/main/source/jitter_buffer.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/webrtc/modules/video_coding/main/source/jitter_buffer.cc b/webrtc/modules/video_coding/main/source/jitter_buffer.cc index 21eb489cb0..6529a035be 100644 --- a/webrtc/modules/video_coding/main/source/jitter_buffer.cc +++ b/webrtc/modules/video_coding/main/source/jitter_buffer.cc @@ -1176,9 +1176,11 @@ bool VCMJitterBuffer::RecycleFramesUntilKeyFrame() { } } drop_count_ += dropped_frames; - WEBRTC_TRACE(webrtc::kTraceWarning, webrtc::kTraceVideoCoding, - VCMId(vcm_id_, receiver_id_), - "Jitter buffer drop count:%u", drop_count_); + if (dropped_frames) { + WEBRTC_TRACE(webrtc::kTraceWarning, webrtc::kTraceVideoCoding, + VCMId(vcm_id_, receiver_id_), + "Jitter buffer drop count:%u", drop_count_); + } TRACE_EVENT_INSTANT0("webrtc", "JB::RecycleFramesUntilKeyFrame"); if (key_frame_found) { // Reset last decoded state to make sure the next frame decoded is a key