Application stuck in gst_init

I have a windows application that is deployed on multiple machines using Windows 11, and it uses some features of Gstreamer, the problem that I have encountered is that, one of these machines gets stuck when the execution reaches the gst_init() line.

I have no clue why this is happening, so I was wondering if someone knows any particular issue or configuration conflict that can be cause by this function, I call this code at the begining of my program execution, to load all the gstreamer libraries and necessary plugins.

My code looks like this:

void loadGstreamerComponents(int argc, char* argv)
{
//We define the custom paths from where we are going to read the DLL files
std::string core_path = Utils::Executable::getExeDirectory() + “\gstreamer”;
std::string plugin_path = Utils::Executable::getExeDirectory() + “\gstreamer\plugins”;

SetDllDirectoryA(core_path.c_str());
_putenv_s("GST_PLUGIN_PATH", plugin_path.c_str());

//Initialize GStreamer libraries and parse GStreamer command line options
const gchar* nano_str;
guint major, minor, micro, nano;

gst_init(&argc, &argv);
gst_version(&major, &minor, &micro, &nano);

if (nano == 1)
	nano_str = "(CVS)";
else if (nano == 2)
	nano_str = "(Prerelease)";
else
	nano_str = "";

PRINTF("This program is linked against GStreamer %d.%d.%d %s\n", major, minor, micro, nano_str);

}

Using some prints and testing, I could trace the moment where the code gets stuck at the gst_init() line, so does anyone have encountered a similar issue or know why this is happening ?