Bug 1534893 - Don't attempt to display an invalid TimeUnit. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 13 Mar 2019 06:58:35 +0000
changeset 521657 383f32cdb53bf9d3ce638dfaff490794758bbf0a
parent 521656 bd3b527094a9d4caa240a2dbab7ff6f3f82861cc
child 521658 a6724ca6cb915b86bd84fdf2c3ec3bfb0072302b
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1534893
milestone67.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 1534893 - Don't attempt to display an invalid TimeUnit. r=gerald Differential Revision: https://phabricator.services.mozilla.com/D23273
dom/media/MediaFormatReader.cpp
dom/media/platforms/apple/AppleVTDecoder.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -2894,17 +2894,21 @@ void MediaFormatReader::SetVideoDecodeTh
     // closing to end of stream. We don't want to skip any frame at this point.
     threshold = keyframe.IsValid() && !keyframe.IsInfinite()
                     ? mOriginalSeekTarget.GetTime()
                     : TimeUnit::Invalid();
   } else {
     return;
   }
 
-  LOG("Set seek threshold to %" PRId64, threshold.ToMicroseconds());
+  if (threshold.IsValid()) {
+    LOG("Set seek threshold to %" PRId64, threshold.ToMicroseconds());
+  } else {
+    LOG("Resetting seek threshold");
+  }
   mVideo.mDecoder->SetSeekThreshold(threshold);
 }
 
 void MediaFormatReader::DoAudioSeek() {
   MOZ_ASSERT(mPendingSeekTime.isSome());
   LOGV("Seeking audio to %" PRId64, mPendingSeekTime.ref().ToMicroseconds());
   auto seekTime = mPendingSeekTime.ref();
   mAudio.mTrackDemuxer->Seek(seekTime)
--- a/dom/media/platforms/apple/AppleVTDecoder.cpp
+++ b/dom/media/platforms/apple/AppleVTDecoder.cpp
@@ -240,17 +240,16 @@ RefPtr<MediaDataDecoder::DecodePromise> 
 
 AppleVTDecoder::AppleFrameRef* AppleVTDecoder::CreateAppleFrameRef(
     const MediaRawData* aSample) {
   MOZ_ASSERT(aSample);
   return new AppleFrameRef(*aSample);
 }
 
 void AppleVTDecoder::SetSeekThreshold(const media::TimeUnit& aTime) {
-  LOG("SetSeekThreshold %lld", aTime.ToMicroseconds());
   if (aTime.IsValid()) {
     mSeekTargetThreshold = Some(aTime);
   } else {
     mSeekTargetThreshold.reset();
   }
 }
 
 //