Bug 1378666. P2 - replace mDecoder->GetImageContainer() with mVideoFrameContainer->GetImageContainer().
MozReview-Commit-ID: CTyiG2uWe9X
--- a/dom/media/android/AndroidMediaReader.cpp
+++ b/dom/media/android/AndroidMediaReader.cpp
@@ -124,17 +124,17 @@ bool AndroidMediaReader::DecodeVideoFram
// stats counters using the AutoNotifyDecoded stack-based class.
AbstractMediaDecoder::AutoNotifyDecoded a(mDecoder);
// Throw away the currently buffered frame if we are seeking.
if (mLastVideoFrame && mVideoSeekTimeUs != -1) {
mLastVideoFrame = nullptr;
}
- ImageBufferCallback bufferCallback(mDecoder->GetImageContainer());
+ ImageBufferCallback bufferCallback(mVideoFrameContainer->GetImageContainer());
RefPtr<Image> currentImage;
// Read next frame
while (true) {
MPAPI::VideoFrame frame;
if (!mPlugin->ReadVideo(mPlugin, &frame, mVideoSeekTimeUs, &bufferCallback)) {
// We reached the end of the video stream. If we have a buffered
// video frame, push it the video queue using the total duration
@@ -215,17 +215,17 @@ bool AndroidMediaReader::DecodeVideoFram
picture.x = (mPicture.x * frame.Y.mWidth) / mInitialFrame.width;
picture.y = (mPicture.y * frame.Y.mHeight) / mInitialFrame.height;
picture.width = (frame.Y.mWidth * mPicture.width) / mInitialFrame.width;
picture.height = (frame.Y.mHeight * mPicture.height) / mInitialFrame.height;
}
// This is the approximate byte position in the stream.
v = VideoData::CreateAndCopyData(mInfo.mVideo,
- mDecoder->GetImageContainer(),
+ mVideoFrameContainer->GetImageContainer(),
pos,
TimeUnit::FromMicroseconds(frame.mTimeUs),
TimeUnit::FromMicroseconds(1), // We don't know the duration yet.
b,
frame.mKeyFrame,
TimeUnit::FromMicroseconds(-1),
picture);
}