Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
c149ea80
Commit
c149ea80
authored
Aug 19, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xspf: simplify.
parent
55f81512
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
31 deletions
+22
-31
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+22
-31
No files found.
modules/demux/playlist/xspf.c
View file @
c149ea80
...
...
@@ -79,7 +79,7 @@ void Close_xspf( vlc_object_t *p_this )
*/
int
Demux
(
demux_t
*
p_demux
)
{
int
i_ret
=
1
;
int
i_ret
=
-
1
;
xml_t
*
p_xml
=
NULL
;
xml_reader_t
*
p_xml_reader
=
NULL
;
char
*
psz_name
=
NULL
;
...
...
@@ -92,45 +92,35 @@ int Demux( demux_t *p_demux )
/* create new xml parser from stream */
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
i_ret
=
-
1
;
else
{
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_demux
->
s
);
if
(
!
p_xml_reader
)
i_ret
=
-
1
;
}
goto
end
;
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_demux
->
s
);
if
(
!
p_xml_reader
)
goto
end
;
/* locating the root node */
if
(
i_ret
==
1
)
do
{
do
if
(
xml_ReaderRead
(
p_xml_reader
)
!=
1
)
{
if
(
xml_ReaderRead
(
p_xml_reader
)
!=
1
)
{
msg_Err
(
p_demux
,
"can't read xml stream"
);
i_ret
=
-
1
;
}
}
while
(
i_ret
==
VLC_SUCCESS
&&
xml_ReaderNodeType
(
p_xml_reader
)
!=
XML_READER_STARTELEM
);
}
msg_Err
(
p_demux
,
"can't read xml stream"
);
goto
end
;
}
}
while
(
xml_ReaderNodeType
(
p_xml_reader
)
!=
XML_READER_STARTELEM
);
/* checking root node name */
if
(
i_ret
==
1
)
psz_name
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_name
||
strcmp
(
psz_name
,
"playlist"
)
)
{
psz_name
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_name
||
strcmp
(
psz_name
,
"playlist"
)
)
{
msg_Err
(
p_demux
,
"invalid root node name: %s"
,
psz_name
);
i_ret
=
-
1
;
}
FREE_NAME
();
msg_Err
(
p_demux
,
"invalid root node name: %s"
,
psz_name
);
goto
end
;
}
free
(
psz_name
);
if
(
i_ret
==
1
)
i_ret
=
parse_playlist_node
(
p_demux
,
p_current_input
,
p_xml_reader
,
"playlist"
)
?
0
:
-
1
;
i_ret
=
parse_playlist_node
(
p_demux
,
p_current_input
,
p_xml_reader
,
"playlist"
)
?
0
:
-
1
;
int
i
;
for
(
i
=
0
;
i
<
p_demux
->
p_sys
->
i_tracklist_entries
;
i
++
)
for
(
int
i
=
0
;
i
<
p_demux
->
p_sys
->
i_tracklist_entries
;
i
++
)
{
input_item_t
*
p_new_input
=
p_demux
->
p_sys
->
pp_tracklist
[
i
];
if
(
p_new_input
)
...
...
@@ -139,6 +129,7 @@ int Demux( demux_t *p_demux )
}
}
end:
HANDLE_PLAY_AND_RELEASE
;
if
(
p_xml_reader
)
xml_ReaderDelete
(
p_xml
,
p_xml_reader
);
...
...
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