Bug 1509316 - p3: transfer image ownership when constructing VideoData. r=jya
authorJohn Lin <jolin@mozilla.com>
Wed, 09 Oct 2019 23:08:31 +0000
changeset 497075 4f83d4be23afba548d86a17b80e820ca273e6efc
parent 497074 ee77371cc6e6b5e15601159271f999df01c957b5
child 497076 5976eb8e6be6aa0822752a6648f9a5fb13cdad23
push id97636
push userjolin@mozilla.com
push dateWed, 09 Oct 2019 23:23:08 +0000
treeherderautoland@5976eb8e6be6 [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 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();