Bug 1222201: Only use container calculated dimensions. r=cpearce

This commit is contained in:
Jean-Yves Avenard 2015-11-16 20:39:09 +11:00
Родитель 88d1681a84
Коммит cf6ee74e32
1 изменённых файлов: 2 добавлений и 6 удалений

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

@ -367,12 +367,8 @@ WMFVideoMFTManager::ConfigureVideoFrameGeometry()
NS_ENSURE_TRUE(videoFormat == MFVideoFormat_NV12 || !mUseHwAccel, E_FAIL); NS_ENSURE_TRUE(videoFormat == MFVideoFormat_NV12 || !mUseHwAccel, E_FAIL);
NS_ENSURE_TRUE(videoFormat == MFVideoFormat_YV12 || mUseHwAccel, E_FAIL); NS_ENSURE_TRUE(videoFormat == MFVideoFormat_YV12 || mUseHwAccel, E_FAIL);
UINT32 width = 0, height = 0; UINT32 width = mVideoInfo.mImage.width;
hr = MFGetAttributeSize(mediaType, MF_MT_FRAME_SIZE, &width, &height); UINT32 height = mVideoInfo.mImage.height;
NS_ENSURE_TRUE(SUCCEEDED(hr), hr);
mVideoInfo.mImage.width = width;
mVideoInfo.mImage.height = height;
nsIntRect pictureRegion = mVideoInfo.mImage; nsIntRect pictureRegion = mVideoInfo.mImage;
// Calculate and validate the picture region and frame dimensions after // Calculate and validate the picture region and frame dimensions after
// scaling by the pixel aspect ratio. // scaling by the pixel aspect ratio.