Bug 1295906 - Remove the call to |mVideoFrameContainer->ClearCurrentFrame()| from ReleaseResources(). r=jya

ReleaseResources() is called when MDSM enters dormant or during shutdown.

When it is called in response to dormant request, we don't want to clear
current frames so we are able to enter dormant state more aggressively
even when the media element is visible to the user.

When it is called from MediaDecoderReader::Shutdown(), it doesn't really
call ClearCurrentFrame() because MediaFormatReader::Shutdown clears the
|mVideoFrameContainer| pointer. So it doesn't make a difference to remove
the call.


MozReview-Commit-ID: IakGHbSMWTv

--HG--
extra : rebase_source : 7a25de39e04f5c7728bf65fcd447cc67b7a85411
extra : source : 44ff0ffaf63ad51a7a382cf0ee1c16e64ade63b9
This commit is contained in:
JW Wang 2016-08-17 17:11:19 +08:00
Родитель 8154fdfc31
Коммит 2fa66fff7d
1 изменённых файлов: 0 добавлений и 5 удалений

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

@ -1972,11 +1972,6 @@ MediaFormatReader::UpdateBufferedWithPromise() {
void MediaFormatReader::ReleaseResources()
{
// Before freeing a video codec, all video buffers needed to be released
// even from graphics pipeline.
if (mVideoFrameContainer) {
mVideoFrameContainer->ClearCurrentFrame();
}
mVideo.ShutdownDecoder();
mAudio.ShutdownDecoder();
}