2020-03-20 15:04:15 +00:00
|
|
|
diff --git a/src/base/msfactory.c b/src/base/msfactory.c
|
|
|
|
index 14f868e3..2e3445a1 100644
|
|
|
|
--- a/src/base/msfactory.c
|
|
|
|
+++ b/src/base/msfactory.c
|
|
|
|
@@ -770,7 +770,12 @@ void ms_factory_uninit_plugins(MSFactory *factory){
|
2015-08-26 21:15:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ms_factory_init_plugins(MSFactory *obj) {
|
2020-03-20 15:04:15 +00:00
|
|
|
- if (obj->plugins_dir == NULL) {
|
2015-08-26 21:15:31 +01:00
|
|
|
+ char *package_plugins_dir;
|
2020-03-20 15:04:15 +00:00
|
|
|
+ // Force plugin dir from environment variable if set
|
|
|
|
+ package_plugins_dir = getenv("MEDIASTREAMER_PLUGINS_DIR");
|
|
|
|
+ if (package_plugins_dir != NULL) {
|
|
|
|
+ ms_factory_set_plugins_dir(obj, package_plugins_dir);
|
|
|
|
+ } else if (obj->plugins_dir == NULL) {
|
|
|
|
#ifdef __APPLE__
|
|
|
|
char *dir = getPluginsDir();
|
|
|
|
if (dir != NULL) {
|