From: RĂ©mi Duraffort Date: Sun, 27 Jun 2010 18:07:15 +0000 (+0200) Subject: xspf: silently skip unknown extension nodes (fix #3696) X-Git-Tag: 1.2.0-pre1~6034 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=0601ce56ed422cc56a63da6d8f3b0123dad340e0;p=vlc xspf: silently skip unknown extension nodes (fix #3696) --- diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c index 278ad103ef..27bef7042d 100644 --- a/modules/demux/playlist/xspf.c +++ b/modules/demux/playlist/xspf.c @@ -738,11 +738,28 @@ static bool parse_extension_node COMPLEX_INTERFACE msg_Warn( p_demux, " requires \"application\" attribute" ); return false; } + /* Skip the extension if the application is not vlc + This will skip all children of the current node */ else if( strcmp( psz_application, "http://www.videolan.org/vlc/playlist/0" ) ) { msg_Dbg( p_demux, "Skipping \"%s\" extension tag", psz_application ); free( psz_application ); - return false; + /* Skip all children */ + while( xml_ReaderRead( p_xml_reader ) == 1 ) + { + if( xml_ReaderNodeType( p_xml_reader ) == XML_READER_ENDELEM ) + { + char *psz_name = xml_ReaderName( p_xml_reader ); + if( !strcmp( psz_name, "extension" ) ) + { + free( psz_name ); + break; + } + msg_Dbg( p_demux, "\tskipping \"%s\" extension child", psz_name ); + free( psz_name ); + } + } + return true; } } free( psz_application );