[vlc-devel] commit: xspf: Don't nop item->psz_nam (Derk-Jan Hartman )
git version control
git at videolan.org
Thu Jun 25 16:17:10 CEST 2009
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Thu Jun 25 15:48:25 2009 +0200| [fffd3cd177dda62326769d08fc409d2af1093509] | committer: Derk-Jan Hartman
xspf: Don't nop item->psz_nam
Set the nop at the end of parsing, instead of the beginning, because SetURI will only init the name once. Now we had all media library items with the title "nop".
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fffd3cd177dda62326769d08fc409d2af1093509
---
modules/demux/playlist/xspf.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index 938ecfe..d79e874 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -416,7 +416,7 @@ static bool parse_track_node COMPLEX_INTERFACE
{NULL, UNKNOWN_CONTENT, {NULL} }
};
- input_item_t *p_new_input = input_item_New( p_demux, "vlc://nop", NULL );
+ input_item_t *p_new_input = input_item_New( p_demux, NULL, NULL );
if( !p_new_input )
{
@@ -503,11 +503,20 @@ static bool parse_track_node COMPLEX_INTERFACE
FREE_ATT();
return false;
}
+
/* leave if the current parent node <track> is terminated */
if( !strcmp( psz_name, psz_element ) )
{
FREE_ATT();
+ /* Make sure we have a URI */
+ char *psz_uri = input_item_GetURI( p_new_input );
+ if( !psz_uri )
+ {
+ input_item_SetURI( p_new_input, "vlc://nop" );
+ }
+ free( psz_uri );
+
if( p_demux->p_sys->i_track_id < 0 )
{
input_item_AddSubItem( p_input_item, p_new_input );
More information about the vlc-devel
mailing list