Bug 1060896 - Don't decode video without an ImageContainer. r=cpearce

This commit is contained in:
Ben Craddock 2014-10-09 07:42:12 +13:00
Родитель 25a8eadfab
Коммит c04652d210
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -310,7 +310,9 @@ MP4Reader::ReadMetadata(MediaInfo* aInfo,
mIndexReady = true;
}
mInfo.mVideo.mHasVideo = mVideo.mActive = mDemuxer->HasValidVideo();
// To decode, we need valid video and a place to put it.
mInfo.mVideo.mHasVideo = mVideo.mActive = mDemuxer->HasValidVideo() &&
mDecoder->GetImageContainer();
const VideoDecoderConfig& video = mDemuxer->VideoConfig();
// If we have video, we *only* allow H.264 to be decoded.
if (mInfo.mVideo.mHasVideo && strcmp(video.mime_type, "video/avc")) {