зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1536766 - Send a black dummy frame out when a video track that contained no frames ends. r=jya
This is similar to what VideoSink does, and is required for us to end playback on HAVE_CURRENT_DATA (a frame for currentTime must be available). Differential Revision: https://phabricator.services.mozilla.com/D27261 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
361b4b399b
Коммит
4fd9a5752f
|
@ -743,6 +743,18 @@ void DecodedStream::SendVideo(bool aIsSameOrigin,
|
|||
}
|
||||
|
||||
if (mVideoQueue.IsFinished() && !mData->mHaveSentFinishVideo) {
|
||||
if (!mData->mLastVideoImage) {
|
||||
// We have video, but the video queue finished before we received any
|
||||
// frame. We insert a black frame to progress any consuming
|
||||
// HTMLMediaElement. This mirrors the behavior of VideoSink.
|
||||
|
||||
// Force a frame - can be null
|
||||
compensateEOS = true;
|
||||
// Force frame to be black
|
||||
aIsSameOrigin = false;
|
||||
// Override the frame's size (will be 0x0 otherwise)
|
||||
mData->mLastVideoImageDisplaySize = mInfo.mVideo.mDisplay;
|
||||
}
|
||||
if (compensateEOS) {
|
||||
VideoSegment endSegment;
|
||||
// Calculate the deviation clock time from DecodedStream.
|
||||
|
|
Загрузка…
Ссылка в новой задаче