Bug 1087810 - Use GMPVideoi420Frame dimensions as picture region in EMEH264Decoder instead of assuming the size of frames is always the same as reported in the container. r=edwin

This commit is contained in:
Chris Pearce 2014-10-23 20:35:19 +13:00
parent dbcc9cde57
commit 24be6b278c
2 changed files with 9 additions and 10 deletions

View File

@ -156,15 +156,16 @@ EMEH264Decoder::Decoded(GMPVideoi420Frame* aDecodedFrame)
b.mPlanes[2].mOffset = 0;
b.mPlanes[2].mSkip = 0;
gfx::IntRect pictureRegion(0, 0, width, height);
VideoData *v = VideoData::Create(mVideoInfo,
mImageContainer,
mLastStreamOffset,
aDecodedFrame->Timestamp(),
aDecodedFrame->Duration(),
b,
false,
-1,
ToIntRect(mPictureRegion));
mImageContainer,
mLastStreamOffset,
aDecodedFrame->Timestamp(),
aDecodedFrame->Duration(),
b,
false,
-1,
pictureRegion);
aDecodedFrame->Destroy();
mCallback->Output(v);
}
@ -261,7 +262,6 @@ EMEH264Decoder::GmpInit()
mVideoInfo.mDisplay = nsIntSize(mConfig.display_width, mConfig.display_height);
mVideoInfo.mHasVideo = true;
mPictureRegion = nsIntRect(0, 0, mConfig.display_width, mConfig.display_height);
return NS_OK;
}

View File

@ -99,7 +99,6 @@ private:
GMPVideoHost* mHost;
VideoInfo mVideoInfo;
nsIntRect mPictureRegion;
const mp4_demuxer::VideoDecoderConfig& mConfig;
nsRefPtr<layers::ImageContainer> mImageContainer;
nsRefPtr<MediaTaskQueue> mTaskQueue;