]> git.sesse.net Git - vlc/blobdiff - lib/media_discoverer.c
lib: refuse to instantiate podcast SD
[vlc] / 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" );