]> git.sesse.net Git - vlc/blobdiff - src/control/mediacontrol_core.c
LibVLC core: remove exceptions
[vlc] / src / control / mediacontrol_core.c
index 7ab5e8f557439f08fa137c64272d45a35b81ec82..f721ec874549ad1300355c2ad8c0bb82af5c9921 100644 (file)
 mediacontrol_Instance* mediacontrol_new( int argc, char** argv, mediacontrol_Exception *exception )
 {
     mediacontrol_Instance* retval;
-    libvlc_exception_t ex;
-
-    libvlc_exception_init( &ex );
     mediacontrol_exception_init( exception );
 
     retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) );
     if( !retval )
         RAISE_NULL( mediacontrol_InternalException, "Out of memory" );
 
-    retval->p_instance = libvlc_new( argc, (const char**)argv, &ex );
-    HANDLE_LIBVLC_EXCEPTION_NULL( &ex );
+    retval->p_instance = libvlc_new( argc, (const char**)argv );
+    if( !retval->p_instance )
+        RAISE_NULL( mediacontrol_InternalException, "Out of memory" );
     retval->p_media_player = libvlc_media_player_new( retval->p_instance );
     if( !retval->p_media_player )
         RAISE_NULL( mediacontrol_InternalException, "Out of memory" );