-inline char* libvlc_exception_get_message( libvlc_exception_t *p_exception )
-{
- if( p_exception->b_raised == 1 && p_exception->psz_message )
+ libvlc_init_threads ();
+
+ const char *my_argv[argc + 2];
+ my_argv[0] = "libvlc"; /* dummy arg0, skipped by getopt() et al */
+ for( int i = 0; i < argc; i++ )
+ my_argv[i + 1] = argv[i];
+ my_argv[argc + 1] = NULL; /* C calling conventions require a NULL */
+
+ libvlc_int_t *p_libvlc_int = libvlc_InternalCreate();
+ if (unlikely (p_libvlc_int == NULL))
+ goto error;
+
+ if (libvlc_InternalInit( p_libvlc_int, argc + 1, my_argv ))