From: William King Date: Wed, 22 Jan 2014 21:55:13 +0000 (-0800) Subject: If libvlc fails to initialize, then the module should fail to load. X-Git-Tag: v1.2.19~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=917217787819e887a570f981c395d043522a802d;p=thirdparty%2Ffreeswitch.git If libvlc fails to initialize, then the module should fail to load. --- diff --git a/src/mod/formats/mod_vlc/mod_vlc.c b/src/mod/formats/mod_vlc/mod_vlc.c index fe0aeb71f0..3238c884e5 100644 --- a/src/mod/formats/mod_vlc/mod_vlc.c +++ b/src/mod/formats/mod_vlc/mod_vlc.c @@ -398,6 +398,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_vlc_load) /* load the vlc engine. */ read_inst = libvlc_new(1, &vlc_args); + if ( ! read_inst ) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "FAILED TO LOAD\n"); + return SWITCH_STATUS_GENERR; + } + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Initialized VLC instance\n"); /* indicate that the module should continue to be loaded */