Bug 1509316 - p3: transfer image ownership when constructing VideoData. r=jya
☠☠ backed out by 6121d0104cd0 ☠ ☠
authorJohn Lin <jolin@mozilla.com>
Sat, 14 Sep 2019 00:23:37 +0000
changeset 495419 d64c35b9c21149f01d57e1e2608900253fc57643
parent 495418 817f14af91f0927746c00309f013351783465389
child 495420 bd3ef721979101f3186db162e1dcb9801f23d548
push id96605
push userjolin@mozilla.com
push dateFri, 27 Sep 2019 16:57:48 +0000
treeherderautoland@d64c35b9c211 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1509316
milestone71.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 1509316 - p3: transfer image ownership when constructing VideoData. r=jya Depends on D45772 Differential Revision: https://phabricator.services.mozilla.com/D45773
dom/media/platforms/android/RemoteDataDecoder.cpp
--- a/dom/media/platforms/android/RemoteDataDecoder.cpp
+++ b/dom/media/platforms/android/RemoteDataDecoder.cpp
@@ -293,17 +293,17 @@ class RemoteVideoDecoder : public Remote
           mSurfaceHandle, inputInfo.mImageSize, false /* NOT continuous */,
           gl::OriginPos::BottomLeft, mConfig.HasAlpha());
       img->AsSurfaceTextureImage()->RegisterSetCurrentCallback(
           std::move(releaseSample));
 
       RefPtr<VideoData> v = VideoData::CreateFromImage(
           inputInfo.mDisplaySize, offset,
           TimeUnit::FromMicroseconds(presentationTimeUs),
-          TimeUnit::FromMicroseconds(inputInfo.mDurationUs), img,
+          TimeUnit::FromMicroseconds(inputInfo.mDurationUs), img.forget(),
           !!(flags & MediaCodec::BUFFER_FLAG_SYNC_FRAME),
           TimeUnit::FromMicroseconds(presentationTimeUs));
 
       RemoteDataDecoder::UpdateOutputStatus(std::move(v));
     }
 
     if (isEOS) {
       DrainComplete();