Bug 1542539 - MediaData::ValidateBufferAndPicture warns on 0 by 0 dimension data instead of asserting. r=jya

Warn instead of asserting since it's possible for decoders to give us 0 by 0
frames here.

Differential Revision: https://phabricator.services.mozilla.com/D26612

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Bryce Van Dyk 2019-04-09 09:56:13 +00:00
Родитель cc01c2ca14
Коммит e8c6250244
1 изменённых файлов: 1 добавлений и 2 удалений

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

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