Backed out changeset e8354c6f439c (bug 1272182) for missing latest updates. r=backout request by developer

This commit is contained in:
Sebastian Hengst 2016-05-12 13:40:42 +02:00
Родитель 266bbbd332
Коммит 5bd0507354
1 изменённых файлов: 7 добавлений и 13 удалений

Просмотреть файл

@ -279,20 +279,14 @@ MediaFormatReader::OnDemuxerInitDone(nsresult)
mMetadataPromise.Reject(ReadMetadataFailureReason::METADATA_ERROR, __func__);
return;
}
UniquePtr<TrackInfo> videoInfo = mVideo.mTrackDemuxer->GetInfo();
videoActive = videoInfo && videoInfo->IsValid();
if (videoActive) {
mInfo.mVideo = *videoInfo->GetAsVideoInfo();
for (const MetadataTag& tag : videoInfo->mTags) {
tags->Put(tag.mKey, tag.mValue);
}
mVideo.mCallback = new DecoderCallback(this, TrackInfo::kVideoTrack);
mVideo.mTimeRanges = mVideo.mTrackDemuxer->GetBuffered();
mTrackDemuxersMayBlock |= mVideo.mTrackDemuxer->GetSamplesMayBlock();
} else {
mVideo.mTrackDemuxer->BreakCycles();
mVideo.mTrackDemuxer = nullptr;
mInfo.mVideo = *mVideo.mTrackDemuxer->GetInfo()->GetAsVideoInfo();
UniquePtr<TrackInfo> info(mVideo.mTrackDemuxer->GetInfo());
for (const MetadataTag& tag : info->mTags) {
tags->Put(tag.mKey, tag.mValue);
}
mVideo.mCallback = new DecoderCallback(this, TrackInfo::kVideoTrack);
mVideo.mTimeRanges = mVideo.mTrackDemuxer->GetBuffered();
mTrackDemuxersMayBlock |= mVideo.mTrackDemuxer->GetSamplesMayBlock();
}
bool audioActive = !!mDemuxer->GetNumberTracks(TrackInfo::kAudioTrack);