[vlc-commits] lib: refuse to instantiate podcast SD

Rémi Denis-Courmont git at videolan.org
Tue Apr 23 21:28:02 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 23 22:19:38 2013 +0300| [20e97e7b8d3c8c4f4f60bc4a76b3503ad9b438f0] | committer: Rémi Denis-Courmont

lib: refuse to instantiate podcast SD

It only works with dedicated hooks in the VLC UI at this point.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=20e97e7b8d3c8c4f4f60bc4a76b3503ad9b438f0
---

 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 1af78c4..b126c95 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" );



More information about the vlc-commits mailing list