From c04652d2105ef536da8e16879acfd3ce741456b5 Mon Sep 17 00:00:00 2001 From: Ben Craddock Date: Thu, 9 Oct 2014 07:42:12 +1300 Subject: [PATCH] Bug 1060896 - Don't decode video without an ImageContainer. r=cpearce --- content/media/fmp4/MP4Reader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/media/fmp4/MP4Reader.cpp b/content/media/fmp4/MP4Reader.cpp index 3ca3e08d0451..0ac3548ad576 100644 --- a/content/media/fmp4/MP4Reader.cpp +++ b/content/media/fmp4/MP4Reader.cpp @@ -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")) {