Bug 1331554. Part 1 - print logs only when decoder.mIsBlankDecode is going to change. r=jya
authorJW Wang <jwwang@mozilla.com>
Mon, 16 Jan 2017 15:20:10 +0800
changeset 377167 f7e15e279222cca90f02c18e9c898f57989ae340
parent 377159 dfdaba2327c9d05f55ddbeeabfbae5acf1c0d7ee
child 377168 18f622aa877eac5d33ab3993504074b86242e267
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1331554
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1331554. Part 1 - print logs only when decoder.mIsBlankDecode is going to change. r=jya MozReview-Commit-ID: 9vExcUapFOb
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -2721,25 +2721,25 @@ MediaFormatReader::SetVideoBlankDecode(b
   MOZ_ASSERT(OnTaskQueue());
   return SetBlankDecode(TrackType::kVideoTrack, aIsBlankDecode);
 }
 
 void
 MediaFormatReader::SetBlankDecode(TrackType aTrack, bool aIsBlankDecode)
 {
   MOZ_ASSERT(OnTaskQueue());
+
   auto& decoder = GetDecoderData(aTrack);
+  if (decoder.mIsBlankDecode == aIsBlankDecode) {
+    return;
+  }
 
   LOG("%s, decoder.mIsBlankDecode = %d => aIsBlankDecode = %d",
       TrackTypeToStr(aTrack), decoder.mIsBlankDecode, aIsBlankDecode);
 
-  if (decoder.mIsBlankDecode == aIsBlankDecode) {
-    return;
-  }
-
   decoder.mIsBlankDecode = aIsBlankDecode;
   decoder.Flush();
   decoder.ShutdownDecoder();
   ScheduleUpdate(TrackInfo::kVideoTrack);
 
   return;
 }