Bug 1295886 - P9. Fix linkage of libmozav* libs on Android. r?snorp
Using flag PR_LD_LOCAL causes PR_LoadLibraryWithFlags to fail, and there should be no difference with PR_LD_GLOBAL anyway on Android.
MozReview-Commit-ID: DAduV8yg8Sx
--- a/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
+++ b/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
@@ -29,17 +29,21 @@ FFVPXRuntimeLinker::LinkStatus FFVPXRunt
LinkStatus_INIT;
static PRLibrary*
MozAVLink(const char* aName)
{
PRLibSpec lspec;
lspec.type = PR_LibSpec_Pathname;
lspec.value.pathname = aName;
+#ifdef MOZ_WIDGET_ANDROID
+ PRLibrary* lib = PR_LoadLibraryWithFlags(lspec, PR_LD_NOW | PR_LD_GLOBAL);
+#else
PRLibrary* lib = PR_LoadLibraryWithFlags(lspec, PR_LD_NOW | PR_LD_LOCAL);
+#endif
if (!lib) {
FFMPEG_LOG("unable to load library %s", aName);
}
return lib;
}
/* static */ bool
FFVPXRuntimeLinker::Init()