Bug 1347439 - part 4: use picture instead of display size to construct Image. r?jya draft
authorJohn Lin <jolin@mozilla.com>
Thu, 09 Mar 2017 12:08:34 +0800
changeset 498976 a6b858e55d989556ced97e8160d6d744c573ea1e
parent 498975 a003fbc97950a2c209300254874e7cf9ecf74d42
child 498977 89c6bd68b1eb81959c6393082681db44a0aa2c96
push id49299
push userbmo:jolin@mozilla.com
push dateWed, 15 Mar 2017 08:25:49 +0000
reviewersjya
bugs1347439, 1344649, 1336431
milestone53.0
Bug 1347439 - part 4: use picture instead of display size to construct Image. r?jya Cherry-picked from bug 1344649 part 1 for bug 1336431 MozReview-Commit-ID: BI76zqogB35
dom/media/platforms/android/RemoteDataDecoder.cpp
--- a/dom/media/platforms/android/RemoteDataDecoder.cpp
+++ b/dom/media/platforms/android/RemoteDataDecoder.cpp
@@ -173,17 +173,17 @@ public:
       bool isEOS = !!(flags & MediaCodec::BUFFER_FLAG_END_OF_STREAM);
       int64_t durationUs = 0;
       if (!mDecoder->mInputDurations.Find(presentationTimeUs, durationUs) && !isEOS) {
         return;
       }
 
       if (size > 0) {
         RefPtr<layers::Image> img = new SurfaceTextureImage(
-          mDecoder->mSurfaceTexture.get(), mDecoder->mConfig.mDisplay,
+          mDecoder->mSurfaceTexture.get(), mDecoder->mConfig.mImage,
           gl::OriginPos::BottomLeft);
 
         RefPtr<VideoData> v = VideoData::CreateFromImage(
           mDecoder->mConfig, offset, presentationTimeUs, durationUs,
           img, !!(flags & MediaCodec::BUFFER_FLAG_SYNC_FRAME),
           presentationTimeUs,
           gfx::IntRect(0, 0, mDecoder->mConfig.mDisplay.width,
                        mDecoder->mConfig.mDisplay.height));