Bug 1303902: [FLAC] Actually check that we found the first frame. r?kamidphish
MozReview-Commit-ID: 3VRf49DqB00
--- a/dom/media/flac/FlacDemuxer.cpp
+++ b/dom/media/flac/FlacDemuxer.cpp
@@ -671,17 +671,17 @@ FlacTrackDemuxer::Init()
// Can seek there immediately to avoid reparsing it all.
mSource.Seek(SEEK_SET, offset);
// Find the first frame to fully initialise our parser.
if (mParser->FindNextFrame(mSource)) {
// Ensure that the next frame returned will be the first.
mSource.Seek(SEEK_SET, mParser->FirstFrame().Offset());
mParser->EndFrameSession();
- } else if (!mParser->Info().IsValid()) {
+ } else if (!mParser->Info().IsValid() || !mParser->FirstFrame().IsValid()) {
// We must find at least a frame to determine the metadata.
// We can't play this stream.
return false;
}
if (!mParser->Info().IsValid() || !mParser->Info().mDuration) {
// Check if we can look at the last frame for the end time to determine the
// duration when we don't have any.