Backout 0ae42938a72d (bug 1073350) for build bustage, on a CLOSED TREE

This commit is contained in:
Daniel Holbert 2014-10-01 18:23:17 -07:00
parent fecbd636c7
commit 986bdc46b4
3 changed files with 0 additions and 32 deletions

View File

@ -228,10 +228,6 @@ GMPVideoDecoderParent::RecvDecoded(const GMPVideoi420FrameData& aDecodedFrame)
return false;
}
if (!CheckFrameData(aDecodedFrame)) {
LOGE(("%s: Decoded frame corrupt, ignoring", __FUNCTION__));
return false;
}
auto f = new GMPVideoi420FrameImpl(aDecodedFrame, &mVideoHost);
// Ignore any return code. It is OK for this to fail without killing the process.

View File

@ -63,31 +63,6 @@ GMPVideoi420FrameImpl::Destroy()
delete this;
}
/* static */ bool
CheckFrameData(const GMPVideoi420FrameData& aFrameData)
{
// We may be passed the "wrong" shmem (one smaller than the actual size).
// This implies a bug or serious error on the child size. Ignore this frame if so.
// Note: Size() greater than expected is also an error, but with no negative consequences
int32_t half_width = (aFrameData.mWidth() + 1) / 2;
if ((aFrameData.mYPlane().mStride() <= 0) || (aFrameData.mYPlane().mSize() <= 0) ||
(aFrameData.mUPlane().mStride() <= 0) || (aFrameData.mUPlane().mSize() <= 0) ||
(aFrameData.mVPlane().mStride() <= 0) || (aFrameData.mVPlane().mSize() <= 0) ||
(aFrameData.mYPlane().mSize() > (int32_t) aFrameData.mYPlane().mBuffer().Size<uint8_t>()) ||
(aFrameData.mUPlane().mSize() > (int32_t) aFrameData.mUPlane().mBuffer().Size<uint8_t>()) ||
(aFrameData.mVPlane().mSize() > (int32_t) aFrameData.mVPlane().mBuffer().Size<uint8_t>()) ||
(aFrameData.mYPlane().mStride() < aFrameData.mWidth()) ||
(aFrameData.mUPlane().mStride() < half_width) ||
(aFrameData.mVPlane().mStride() < half_width) ||
(aFrameData.mYPlane().mSize() < aFrameData.mYPlane().mStride() * aFrameData.mHeight()) ||
(aFrameData.mUPlane().mSize() < aFrameData.mUPlane().mStride() * ((aFrameData.mHeight()+1)/2)) ||
(aFrameData.mVPlane().mSize() < aFrameData.mVPlane().mStride() * ((aFrameData.mHeight()+1)/2)))
{
return false;
}
return true;
}
bool
GMPVideoi420FrameImpl::CheckDimensions(int32_t aWidth, int32_t aHeight,
int32_t aStride_y, int32_t aStride_u, int32_t aStride_v)

View File

@ -16,9 +16,6 @@ namespace gmp {
class GMPVideoi420FrameData;
static bool
CheckFrameData(const GMPVideoi420FrameData& aFrameData);
class GMPVideoi420FrameImpl : public GMPVideoi420Frame
{
friend struct IPC::ParamTraits<mozilla::gmp::GMPVideoi420FrameImpl>;