Bug 1206977: P12. Properly shutdown all created test decoders. r=cpearce

This commit is contained in:
Jean-Yves Avenard 2015-10-07 10:40:48 +11:00
Родитель b4365d5d77
Коммит 6f051abaa4
2 изменённых файлов: 3 добавлений и 0 удалений

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

@ -56,6 +56,7 @@ CanCreateMP3Decoder()
config.mBitDepth = 16;
nsRefPtr<MediaDataDecoder> decoder(CreateTestMP3Decoder(config));
if (decoder) {
decoder->Shutdown();
result = true;
}
haveCachedResult = true;

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

@ -220,6 +220,7 @@ MP4Decoder::IsVideoAccelerated(layers::LayersBackend aBackend, nsACString& aFail
return false;
}
bool result = decoder->IsHardwareAccelerated(aFailureReason);
decoder->Shutdown();
return result;
}
@ -293,6 +294,7 @@ MP4Decoder::CanCreateAACDecoder()
MOZ_ARRAY_LENGTH(sTestAACExtraData));
nsRefPtr<MediaDataDecoder> decoder(CreateTestAACDecoder(config));
if (decoder) {
decoder->Shutdown();
result = true;
}
haveCachedResult = true;