Bug 1188220: Allow disabling HW acceleration even when SharedDecoderManager isn't used. r=cpearce

The SharedDecoderManager is being obsoleted.
This commit is contained in:
Jean-Yves Avenard 2015-07-28 12:23:54 +10:00
Родитель ce730a7b65
Коммит bec365db4b
1 изменённых файлов: 9 добавлений и 5 удалений

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

@ -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);
}