Bug 1048173 - Make sure we can link against FFmpeg libraries before attempting to create a decoder. r=edwin

This commit is contained in:
Jean-Yves Avenard 2014-08-05 16:13:05 +10:00
parent 40e1f9f229
commit 2342791f3c
2 changed files with 7 additions and 1 deletions

View File

@ -133,7 +133,10 @@ PlatformDecoderModule::Create()
#endif
#ifdef MOZ_FFMPEG
if (sFFmpegDecoderEnabled) {
return FFmpegRuntimeLinker::CreateDecoderModule();
nsAutoPtr<PlatformDecoderModule> m(FFmpegRuntimeLinker::CreateDecoderModule());
if (m) {
return m.forget();
}
}
#endif
#ifdef MOZ_APPLEMEDIA

View File

@ -99,6 +99,9 @@ FFmpegRuntimeLinker::Bind(const char* aLibName, uint32_t Version)
/* static */ PlatformDecoderModule*
FFmpegRuntimeLinker::CreateDecoderModule()
{
if (!Link()) {
return nullptr;
}
PlatformDecoderModule* module = sLib->Factory();
return module;
}