From 20e97e7b8d3c8c4f4f60bc4a76b3503ad9b438f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 23 Apr 2013 22:19:38 +0300 Subject: [PATCH] lib: refuse to instantiate podcast SD It only works with dedicated hooks in the VLC UI at this point. --- lib/media_discoverer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/media_discoverer.c b/lib/media_discoverer.c index 1af78c41c3..b126c95fa3 100644 --- a/lib/media_discoverer.c +++ b/lib/media_discoverer.c @@ -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" ); -- 2.39.2