зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1188220: Allow disabling HW acceleration even when SharedDecoderManager isn't used. r=cpearce
The SharedDecoderManager is being obsoleted.
This commit is contained in:
Родитель
ce730a7b65
Коммит
bec365db4b
|
@ -504,11 +504,15 @@ void
|
|||
MediaFormatReader::DisableHardwareAcceleration()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
if (HasVideo() && mSharedDecoderManager) {
|
||||
mSharedDecoderManager->DisableHardwareAcceleration();
|
||||
|
||||
if (!mSharedDecoderManager->Recreate(mInfo.mVideo)) {
|
||||
mVideo.mError = true;
|
||||
if (HasVideo()) {
|
||||
mPlatform->DisableHardwareAcceleration();
|
||||
Flush(TrackInfo::kVideoTrack);
|
||||
mVideo.mDecoder->Shutdown();
|
||||
mVideo.mDecoder = nullptr;
|
||||
if (!EnsureDecodersSetup()) {
|
||||
LOG("Unable to re-create decoder, aborting");
|
||||
NotifyError(TrackInfo::kVideoTrack);
|
||||
return;
|
||||
}
|
||||
ScheduleUpdate(TrackInfo::kVideoTrack);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче