From b1bba167f4e291ea5f9f537bc695367f4809e080 Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Fri, 31 May 2013 18:52:16 +0000 Subject: [PATCH] Prevent excessive logging in jitter buffer Jitter buffer logs a message when it is going to recycle frames. This adds a lot of noise even in normal operation. This change make sure only critical cases are logged. R=mikhal@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1580007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4150 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/video_coding/main/source/jitter_buffer.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/video_coding/main/source/jitter_buffer.cc b/webrtc/modules/video_coding/main/source/jitter_buffer.cc index 0c0306a83c..f901692194 100644 --- a/webrtc/modules/video_coding/main/source/jitter_buffer.cc +++ b/webrtc/modules/video_coding/main/source/jitter_buffer.cc @@ -847,7 +847,9 @@ uint16_t* VCMJitterBuffer::GetNackList(uint16_t* nack_list_size, if (!first_frame_is_key) { const bool have_non_empty_frame = frame_list_.end() != find_if( frame_list_.begin(), frame_list_.end(), HasNonEmptyState); - LOG_F(LS_INFO) << "First frame is not key; Recycling."; + if (have_non_empty_frame) { + LOG_F(LS_INFO) << "First frame is not key; Recycling."; + } bool found_key_frame = RecycleFramesUntilKeyFrame(); if (!found_key_frame) { *request_key_frame = have_non_empty_frame;