[vlc-devel] commit: libvlc: don' t abort but return an error code if no modules were found. (Pierre d' Herbemont )

git version control git at videolan.org
Thu Dec 10 23:06:56 CET 2009


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Thu Dec 10 23:05:27 2009 +0100| [808e8fb5910f16b91c02cc36b236f2a5c52d5949] | committer: Pierre d'Herbemont 

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 at remlab.net>.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=808e8fb5910f16b91c02cc36b236f2a5c52d5949
---

 src/libvlc.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index 3cef1bf..aa512d2 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -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 );




More information about the vlc-devel mailing list