Compile fix + handle case with no xml:base
authorChristophe Mutricy <xtophe@videolan.org>
Wed, 25 Oct 2006 11:53:38 +0000 (11:53 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Wed, 25 Oct 2006 11:53:38 +0000 (11:53 +0000)
modules/demux/playlist/xspf.c

index d4fe4af..89dcd9a 100644 (file)
@@ -533,7 +533,8 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
 
                     if( psz_uri )
                     {
-                        if( !strstr( psz_uri, "://" ) )
+                        if( p_demux->p_sys->psz_base && 
+                            !strstr( psz_uri, "://" ) )
                         {
                            char* psz_tmp = malloc( 
                                    strlen(p_demux->p_sys->psz_base) + 
@@ -541,7 +542,7 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
                            if( !psz_tmp )
                            {
                                msg_Err( p_demux, "out of memory");
-                               return ENOMEM;
+                               return VLC_FALSE;
                            }
                            sprintf( psz_tmp, "%s%s", 
                                     p_demux->p_sys->psz_base, psz_uri );