Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
b18257a3
Commit
b18257a3
authored
Aug 19, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xspf: simplify again.
parent
ab4442b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+13
-16
No files found.
modules/demux/playlist/xspf.c
View file @
b18257a3
...
...
@@ -323,35 +323,34 @@ static bool parse_playlist_node COMPLEX_INTERFACE
static
bool
parse_tracklist_node
COMPLEX_INTERFACE
{
VLC_UNUSED
(
psz_element
);
char
*
psz_name
=
NULL
;
int
i_node
;
char
*
psz_name
;
int
i_ntracks
=
0
;
/* now parse the <track>s */
while
(
xml_ReaderRead
(
p_xml_reader
)
==
1
)
{
i_node
=
xml_ReaderNodeType
(
p_xml_reader
);
i
nt
i
_node
=
xml_ReaderNodeType
(
p_xml_reader
);
if
(
i_node
==
XML_READER_STARTELEM
)
{
psz_
name
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_name
)
char
*
psz_elt
name
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_
elt
name
)
{
msg_Err
(
p_demux
,
"unexpected end of xml data"
);
FREE_NAME
(
);
free
(
psz_eltname
);
return
false
;
}
if
(
strcmp
(
psz_name
,
"track"
)
)
if
(
strcmp
(
psz_
elt
name
,
"track"
)
)
{
msg_Err
(
p_demux
,
"unexpected child of <trackList>: <%s>"
,
psz_name
);
FREE_NAME
(
);
psz_
elt
name
);
free
(
psz_eltname
);
return
false
;
}
FREE_NAME
(
);
free
(
psz_eltname
);
/* parse the track data in a separate function */
if
(
parse_track_node
(
p_demux
,
p_input_item
,
p_xml_reader
,
"track"
)
==
true
)
if
(
parse_track_node
(
p_demux
,
p_input_item
,
p_xml_reader
,
"track"
)
)
i_ntracks
++
;
}
else
if
(
i_node
==
XML_READER_ENDELEM
)
...
...
@@ -362,20 +361,18 @@ static bool parse_tracklist_node COMPLEX_INTERFACE
if
(
xml_ReaderNodeType
(
p_xml_reader
)
!=
XML_READER_ENDELEM
)
{
msg_Err
(
p_demux
,
"there's a missing </trackList>"
);
FREE_NAME
();
return
false
;
}
psz_name
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_name
||
strcmp
(
psz_name
,
"trackList"
)
)
{
msg_Err
(
p_demux
,
"expected: </trackList>, found: </%s>"
,
psz_name
);
FREE_NAME
(
);
free
(
psz_name
);
return
false
;
}
FREE_NAME
(
);
free
(
psz_name
);
msg_Dbg
(
p_demux
,
"parsed %i tracks successfully"
,
i_ntracks
);
return
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment