1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00
nixpkgs/pkgs/development/libraries/mediastreamer/plugins_dir.patch
2020-03-28 11:25:30 +02:00

19 lines
653 B
Diff

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){
}
void ms_factory_init_plugins(MSFactory *obj) {
- if (obj->plugins_dir == NULL) {
+ char *package_plugins_dir;
+ // 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) {