Bug 1261900: [MSE/webm] P6. Don't unnecessarily calculate the next keyframe time. r?kinetik draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 22 Apr 2016 16:41:52 +1000
changeset 356316 b513d28da7068b8f316aee4bbf14df2f0e681256
parent 356315 512d0eab59ce958561b3252e5b2f8385c25af334
child 356317 48534e9887a31ee60efcd6cc00c4b19f37abc15d
push id16492
push userbmo:jyavenard@mozilla.com
push dateTue, 26 Apr 2016 06:48:07 +0000
reviewerskinetik
bugs1261900
milestone49.0a1
Bug 1261900: [MSE/webm] P6. Don't unnecessarily calculate the next keyframe time. r?kinetik MSE only uses the webm demuxer to demux all samples at once. Attempting to find the next keyframe as such always fail. MozReview-Commit-ID: KKmOpKGde2C
dom/media/webm/WebMDemuxer.cpp
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -893,17 +893,17 @@ WebMTrackDemuxer::GetSamples(int32_t aNu
     UpdateSamples(samples->mSamples);
     return SamplesPromise::CreateAndResolve(samples, __func__);
   }
 }
 
 void
 WebMTrackDemuxer::SetNextKeyFrameTime()
 {
-  if (mType != TrackInfo::kVideoTrack) {
+  if (mType != TrackInfo::kVideoTrack || mParent->IsMediaSource()) {
     return;
   }
 
   int64_t frameTime = -1;
 
   mNextKeyframeTime.reset();
 
   MediaRawDataQueue skipSamplesQueue;