Bug 1243538: P3. Adjust libvpx decoder to allow different decoding size from metadata. r?mattwoodrow draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 15 Apr 2016 16:46:29 +1000
changeset 352919 e086de0745e866c6a6a0ec50db9426c5585a39c8
parent 352918 b44b7873f89dd23ab153a71d3027eaccc4e49738
child 352920 1f2f2022cbb73bee3796499c456f9ace8aa68096
push id15841
push userbmo:jyavenard@mozilla.com
push dateTue, 19 Apr 2016 00:09:30 +0000
reviewersmattwoodrow
bugs1243538
milestone48.0a1
Bug 1243538: P3. Adjust libvpx decoder to allow different decoding size from metadata. r?mattwoodrow MozReview-Commit-ID: I6yyaonI9xN
dom/media/platforms/agnostic/VPXDecoder.cpp
--- 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);