From 8fde5709409b841e519e02ffff2b203928107b46 Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Fri, 28 Jun 2013 22:09:37 +1200 Subject: [PATCH] Bug 888175 - Don't log dropped frames in MediaDecoderStateMachine if MOZ_QUIET is set. r=padenot --- content/media/MediaDecoderStateMachine.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/content/media/MediaDecoderStateMachine.cpp b/content/media/MediaDecoderStateMachine.cpp index f2da2b86a9e8..36c311aed395 100644 --- a/content/media/MediaDecoderStateMachine.cpp +++ b/content/media/MediaDecoderStateMachine.cpp @@ -2466,11 +2466,13 @@ void MediaDecoderStateMachine::AdvanceFrame() while (mRealTime || clock_time >= frame->mTime) { mVideoFrameEndTime = frame->mEndTime; currentFrame = frame; - LOG(PR_LOG_DEBUG, ("%p Decoder discarding video frame %lld", mDecoder.get(), frame->mTime)); #ifdef PR_LOGGING - if (droppedFrames++) { - LOG(PR_LOG_DEBUG, ("%p Decoder discarding video frame %lld (%d so far)", - mDecoder.get(), frame->mTime, droppedFrames - 1)); + if (!PR_GetEnv("MOZ_QUIET")) { + LOG(PR_LOG_DEBUG, ("%p Decoder discarding video frame %lld", mDecoder.get(), frame->mTime)); + if (droppedFrames++) { + LOG(PR_LOG_DEBUG, ("%p Decoder discarding video frame %lld (%d so far)", + mDecoder.get(), frame->mTime, droppedFrames - 1)); + } } #endif mReader->VideoQueue().PopFront();