]> git.sesse.net Git - vlc/commitdiff
lib: refuse to instantiate podcast SD
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 23 Apr 2013 19:19:38 +0000 (22:19 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 23 Apr 2013 19:19:38 +0000 (22:19 +0300)
It only works with dedicated hooks in the VLC UI at this point.

lib/media_discoverer.c

index 1af78c41c3e4ebe4c682ae90ae30118cbe54dd2b..b126c95fa346d3e6821dbd647f5bf581ccc1d063 100644 (file)
@@ -188,9 +188,11 @@ libvlc_media_discoverer_t *
 libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
                                        const char * psz_name )
 {
-    libvlc_media_discoverer_t * p_mdis;
+    /* podcast SD is a hack and only works with custom playlist callbacks. */
+    if( !strncasecmp( psz_name, "podcast", 7 ) )
+        return NULL;
 
-    p_mdis = malloc(sizeof(libvlc_media_discoverer_t));
+    libvlc_media_discoverer_t *p_mdis = malloc(sizeof(*p_mdis));
     if( unlikely(!p_mdis) )
     {
         libvlc_printerr( "Not enough memory" );