toxic: 0.15.1 -> 0.16.0
[NixPkgs.git] / pkgs / development / libraries / mediastreamer / plugins_dir.patch
blob43e398aafee4d80df4fd2ba1256dacd9e7c1651d
1 diff --git a/src/base/msfactory.c b/src/base/msfactory.c
2 index 14f868e3..2e3445a1 100644
3 --- a/src/base/msfactory.c
4 +++ b/src/base/msfactory.c
5 @@ -770,7 +770,12 @@ void ms_factory_uninit_plugins(MSFactory *factory){
8 void ms_factory_init_plugins(MSFactory *obj) {
9 - if (obj->plugins_dir == NULL) {
10 + char *package_plugins_dir;
11 + // Force plugin dir from environment variable if set
12 + package_plugins_dir = getenv("MEDIASTREAMER_PLUGINS_DIR");
13 + if (package_plugins_dir != NULL) {
14 + ms_factory_set_plugins_dir(obj, package_plugins_dir);
15 + } else if (obj->plugins_dir == NULL) {
16 #ifdef __APPLE__
17 char *dir = getPluginsDir();
18 if (dir != NULL) {