Bug 1243538: P4. Adjust ffvpx decoder to allow different decoding size from metadata. r=mattwoodrow
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 15 Apr 2016 16:46:53 +1000
changeset 331869 f2c1da947a125c6e6eb84f20487b0b1be92f2e01
parent 331868 58cf5d2934fb21d321a6a3f6067464b12e953323
child 331870 9bcedb72a5c35515e18df1ff8ebf030a86af7c2e
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1243538
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1243538: P4. Adjust ffvpx decoder to allow different decoding size from metadata. r=mattwoodrow MozReview-Commit-ID: FyfAhJ42w5l
dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
@@ -297,17 +297,19 @@ FFmpegVideoDecoder<LIBAV_VER>::DoDecodeF
     RefPtr<VideoData> v = VideoData::Create(mInfo,
                                             mImageContainer,
                                             aSample->mOffset,
                                             pts,
                                             duration,
                                             b,
                                             !!mFrame->key_frame,
                                             -1,
-                                            mInfo.ImageRect());
+                                            mInfo.ScaledImageRect(mFrame->width,
+                                                                  mFrame->height));
+
     if (!v) {
       NS_WARNING("image allocation error.");
       mCallback->Error();
       return DecodeResult::DECODE_ERROR;
     }
     mCallback->Output(v);
     return DecodeResult::DECODE_FRAME;
   }