libvlc: Rename input to media_instance. And add the possibility to create a medi_inst...
[vlc.git] / src / control / event.c
index 5f3c670..d67c148 100644 (file)
@@ -90,15 +90,17 @@ static int handle_event( vlc_object_t *p_this, char const *psz_cmd,
 static input_thread_t * get_input(libvlc_instance_t * p_instance)
 {
     libvlc_exception_t p_e_unused; /* FIXME: error checking here */
-    libvlc_input_t * p_libvlc_input = libvlc_playlist_get_input( p_instance, &p_e_unused );
+    libvlc_media_instance_t * p_mi;
     input_thread_t * p_input;
 
-    if( !p_libvlc_input )
+    p_mi = libvlc_playlist_get_media_instance( p_instance, &p_e_unused );
+
+    if( !p_mi )
         return NULL;
-    
-    p_input = libvlc_get_input_thread( p_libvlc_input, &p_e_unused );
 
-    libvlc_input_free(p_libvlc_input);
+    p_input = libvlc_get_input_thread( p_mi, &p_e_unused );
+
+    libvlc_media_instance_destroy( p_mi );
 
     return p_input;
 }