Bug 1369382: Don't make hard assertion that the queued sample is a keyframe. r=kaku
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 01 Jun 2017 16:07:27 +0200
changeset 410087 5fe1447e3756f8db5b698f1327c2231316a705aa
parent 410086 77f2dd5563d2c3e9ad7ada388036f1846c1e2107
child 410088 353d47c93c2bd1453747f6e5ed29bf5232063adf
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1369382
milestone55.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 1369382: Don't make hard assertion that the queued sample is a keyframe. r=kaku When seeking, we go to the first IDR prior the seek target. However, if the MP4 sample table is invalid the frame returned may not be an IDR. It is an error for that frame to not be a keyframe, so we do want to have way to detect them through logging. Change assertion to a soft assertion for that purpose. MozReview-Commit-ID: EMgwRo1mYMp
dom/media/fmp4/MP4Demuxer.cpp
--- a/dom/media/fmp4/MP4Demuxer.cpp
+++ b/dom/media/fmp4/MP4Demuxer.cpp
@@ -492,18 +492,18 @@ MP4TrackDemuxer::GetSamples(int32_t aNum
   EnsureUpToDateIndex();
   RefPtr<SamplesHolder> samples = new SamplesHolder;
   if (!aNumSamples) {
     return SamplesPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_DEMUXER_ERR,
                                            __func__);
   }
 
   if (mQueuedSample) {
-    MOZ_ASSERT(mQueuedSample->mKeyframe,
-               "mQueuedSample must be a keyframe");
+    NS_ASSERTION(mQueuedSample->mKeyframe,
+                 "mQueuedSample must be a keyframe");
     samples->mSamples.AppendElement(mQueuedSample);
     mQueuedSample = nullptr;
     aNumSamples--;
   }
   RefPtr<MediaRawData> sample;
   while (aNumSamples && (sample = GetNextSample())) {
     if (!sample->Size()) {
       continue;