Bug 1346120 part 4 - Only set ImageContainer if there are valid new images in VideoSink::RenderVideoFrames(); r=jwwang

So that the suspended video element won't be rendered any more and keeps the last decoded frame.
This is the effect that UX specification defines.
And actually, we don't need to set ImageContainer if there are no valid new images.

MozReview-Commit-ID: B7RS3LXu8J0

--HG--
extra : rebase_source : 114d68046cbbb478fda63d16da7fbb4fa2fc3dd3
extra : intermediate-source : 29e6d114dfb0c64d0b6a77d924066be9f69bb287
extra : source : d6a2b47b14f6ac00ea420f5eba7190c7af725381
This commit is contained in:
Kaku Kuo 2017-03-09 17:16:17 +08:00
Родитель 7c985e041c
Коммит 7ac3ba1c91
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -400,8 +400,11 @@ VideoSink::RenderVideoFrames(int32_t aMaxFrames,
VSINK_LOG_V("playing video frame %" PRId64 " (id=%x) (vq-queued=%" PRIuSIZE ")", VSINK_LOG_V("playing video frame %" PRId64 " (id=%x) (vq-queued=%" PRIuSIZE ")",
frame->mTime, frame->mFrameID, VideoQueue().GetSize()); frame->mTime, frame->mFrameID, VideoQueue().GetSize());
} }
if (images.Length() > 0) {
mContainer->SetCurrentFrames(frames[0]->As<VideoData>()->mDisplay, images); mContainer->SetCurrentFrames(frames[0]->As<VideoData>()->mDisplay, images);
} }
}
void void
VideoSink::UpdateRenderedVideoFrames() VideoSink::UpdateRenderedVideoFrames()