Commit 808e8fb5 authored by Pierre's avatar Pierre

libvlc: don't abort but return an error code if no modules were found.

Also, let the possibility to run vlc -H.

Pointed-out-by Rémi Denis-Courmont <remi@remlab.net>.
parent b1e92e7b
......@@ -475,12 +475,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
module_list_free( list );
msg_Dbg( p_libvlc, "module bank initialized (%zu modules)", module_count );
if( module_count <= 1)
{
msg_Err( p_libvlc, "No modules were found, refusing to start. Check "
"that you properly gave a module path with --plugin-path.");
abort();
}
/* Check for help on modules */
if( (p_tmp = var_CreateGetNonEmptyString( p_libvlc, "module" )) )
{
......@@ -536,6 +530,14 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
}
}
if( module_count <= 1)
{
msg_Err( p_libvlc, "No modules were found, refusing to start. Check "
"that you properly gave a module path with --plugin-path.");
b_exit = true;
i_ret = VLC_ENOITEM;
}
if( b_exit )
{
module_EndBank( p_libvlc, true );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment