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

--HG--
extra : rebase_source : 12b2949e5b9a243ea8bf02c1cde4e94199f47d8a
This commit is contained in:
Eric Phan 2014-06-06 15:06:58 +02:00
parent 74d5c89be8
commit 86361b4c17

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]) ||