Bug 1015979 - Use a fatal assert in case of empty picture rect when creating a video frame. r=cpearce DONTBUILD

This commit is contained in:
Eric Phan 2014-06-06 15:11:34 +02:00
parent 4f9ed3969e
commit a34a625c50

View File

@ -230,7 +230,8 @@ VideoData* VideoData::Create(VideoInfo& aInfo,
// The following situations could be triggered by invalid input
if (aPicture.width <= 0 || aPicture.height <= 0) {
NS_WARNING("Empty picture rect");
// In debug mode, makes the error more noticeable
MOZ_ASSERT(false, "Empty picture rect");
return nullptr;
}
if (!ValidatePlane(aBuffer.mPlanes[0]) || !ValidatePlane(aBuffer.mPlanes[1]) ||