[vlc-devel] [PATCH] add function libvlc_set_plugin_path
remi at remlab.net
Wed Dec 2 23:39:18 CET 2015
> Using enviroment variable VLC_PLUGIN_PATH works only if you use runtime
> similar to libvlc runtime.
In general, you cannot use different run-times in a single program to begin
with. AFAIU, C++ pretty much forbids it. C does not, but the C++ run-time
depends on the C run-time, and most C run-times will crash if you combine more
than one of them in a single process.
On those OSes that don´t crash (e.g. probably Win32), you can modify the
environment using the lower level APIs underneath the CRT.
So either ways, the environment variables are the least of concerns and I fail
to see the point of this patch.
> If runtime lib of your main project differs from libvlc runtime lib
then you are on your own, pretty much.
> (or your application is neither C++ nor C project)
Then you most probably need some native glue. No news here.
> setting of VLC_PLUGIN_PATH gives nothing, because function getenv used
> inside of vlc core returns cached values of env variables.
That´s not true.
Also the patch is not thread-safe not re-entrant and not dealing with errors.
More information about the vlc-devel