Bug 1183653: MediaFormatReader: returns error if no tracks are usable. r=cpearce

This commit is contained in:
Jean-Yves Avenard 2015-07-15 00:25:44 +10:00
parent cad4e5430e
commit 205699a9ff

View File

@ -358,6 +358,11 @@ MediaFormatReader::OnDemuxerInitDone(nsresult)
NS_WARNING("Unable to clone current MediaDataDemuxer");
return;
}
if (!videoActive && !audioActive) {
mMetadataPromise.Reject(ReadMetadataFailureReason::METADATA_ERROR, __func__);
return;
}
if (videoActive) {
mVideoTrackDemuxer =
mMainThreadDemuxer->GetTrackDemuxer(TrackInfo::kVideoTrack, 0);