]> git.sesse.net Git - vlc/blobdiff - src/control/media_discoverer.c
HTTPd: stat -> utf8_stat
[vlc] / src / control / media_discoverer.c
index 94b4b0aef6787fbf4526b6f113e16421a55bf991..0a3123e5d041c5d344ba46e0e6fcff077d615157 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <assert.h>
 
 #include <vlc/libvlc.h>
@@ -76,7 +80,7 @@ static void services_discovery_item_added( const vlc_event_t * p_event,
         {
             libvlc_media_t * p_catmd;
             p_catmd = libvlc_media_new_as_node( p_mdis->p_libvlc_instance, psz_cat, NULL );
-            p_mlist = libvlc_media_subitems( p_catmd, NULL );
+            p_mlist = libvlc_media_subitems( p_catmd );
             p_mlist->b_read_only = true;
 
             /* Insert the newly created mlist in our dictionary */
@@ -174,7 +178,8 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
     p_mdis = malloc(sizeof(libvlc_media_discoverer_t));
     if( !p_mdis )
     {
-        libvlc_exception_raise( p_e, "Not enough memory" );
+        libvlc_exception_raise( p_e );
+        libvlc_printerr( "Not enough memory" );
         return NULL;
     }
 
@@ -198,7 +203,8 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
     if( !p_mdis->p_sd )
     {
         libvlc_media_list_release( p_mdis->p_mlist );
-        libvlc_exception_raise( p_e, "Can't find the services_discovery module named '%s'", psz_name );
+        libvlc_exception_raise( p_e );
+        libvlc_printerr( "%s: no such discovery module found", psz_name );
         free( p_mdis );
         return NULL;
     }
@@ -224,7 +230,8 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
     if( !vlc_sd_Start( p_mdis->p_sd, psz_name ) )
     {
         libvlc_media_list_release( p_mdis->p_mlist );
-        libvlc_exception_raise( p_e, "Can't start the services_discovery module named '%s'", psz_name );
+        libvlc_exception_raise( p_e );
+        libvlc_printerr( "%s: internal module error", psz_name );
         free( p_mdis );
         return NULL;
     }