]> git.sesse.net Git - vlc/blobdiff - bin/vlc.c
Generate Windows resource file on need basis
[vlc] / bin / vlc.c
index 246ea149d52aa2208e17755fcb25303374d814ee..b76d8fb121c1c7353097f41cffd48f07d99ccbff 100644 (file)
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -150,31 +150,24 @@ int main( int i_argc, const char *ppsz_argv[] )
             return 1; // BOOM!
     argv[argc] = NULL;
 
-    libvlc_exception_t ex, dummy;
+    libvlc_exception_t ex;
     libvlc_exception_init (&ex);
-    libvlc_exception_init (&dummy);
 
     /* Initialize libvlc */
     libvlc_instance_t *vlc = libvlc_new (argc, argv, &ex);
 
     if (vlc != NULL)
     {
-        libvlc_add_intf (vlc, "signals", &ex);
-        if (libvlc_exception_raised (&ex))
-        {
-            libvlc_exception_clear (&ex);
+        if (libvlc_add_intf (vlc, "signals"))
             pthread_sigmask (SIG_UNBLOCK, &set, NULL);
-        }
 #if !defined (HAVE_MAEMO)
-        libvlc_add_intf (vlc, "globalhotkeys,none", &ex);
+        libvlc_add_intf (vlc, "globalhotkeys,none");
 #endif
-        libvlc_exception_clear (&ex);
-        libvlc_add_intf (vlc, NULL, &ex);
-        libvlc_playlist_play (vlc, -1, 0, NULL, &dummy);
-        libvlc_wait (vlc);
-
-        if (libvlc_exception_raised (&ex))
-            fprintf( stderr, "%s\n", libvlc_errmsg() );
+        if (libvlc_add_intf (vlc, NULL) == 0)
+        {
+            libvlc_playlist_play (vlc, -1, 0, NULL);
+            libvlc_wait (vlc);
+        }
         libvlc_release (vlc);
     }