]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
If libvlc fails to initialize, then the module should fail to load.
authorWilliam King <william.king@quentustech.com>
Wed, 22 Jan 2014 21:55:13 +0000 (13:55 -0800)
committerWilliam King <william.king@quentustech.com>
Wed, 22 Jan 2014 21:56:37 +0000 (13:56 -0800)
src/mod/formats/mod_vlc/mod_vlc.c

index fe0aeb71f0e55147be625fd3ff0456d773a0ff1f..3238c884e56833ee17dbd9bb26b32c77040e0ead 100644 (file)
@@ -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 */