Bug 1243538: P3. Adjust libvpx decoder to allow different decoding size from metadata. r?mattwoodrow
MozReview-Commit-ID: I6yyaonI9xN
--- a/dom/media/platforms/agnostic/VPXDecoder.cpp
+++ b/dom/media/platforms/agnostic/VPXDecoder.cpp
@@ -154,17 +154,18 @@ VPXDecoder::DoDecodeFrame(MediaRawData*
RefPtr<VideoData> v = VideoData::Create(mInfo,
mImageContainer,
aSample->mOffset,
aSample->mTime,
aSample->mDuration,
b,
aSample->mKeyframe,
aSample->mTimecode,
- mInfo.ImageRect());
+ mInfo.ScaledImageRect(img->d_w,
+ img->d_h));
if (!v) {
LOG("Image allocation error source %ldx%ld display %ldx%ld picture %ldx%ld",
img->d_w, img->d_h, mInfo.mDisplay.width, mInfo.mDisplay.height,
mInfo.mImage.width, mInfo.mImage.height);
return -1;
}
mCallback->Output(v);