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
--- 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;