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
1d451bbb
Commit
1d451bbb
authored
Aug 29, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xspf: cosmetics.
parent
f3c14e26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+14
-17
No files found.
modules/demux/playlist/xspf.c
View file @
1d451bbb
...
...
@@ -382,10 +382,10 @@ static bool parse_tracklist_node COMPLEX_INTERFACE
*/
static
bool
parse_track_node
COMPLEX_INTERFACE
{
int
i_node
;
char
*
psz_name
=
NULL
;
char
*
psz_value
=
NULL
;
xml_elem_hnd_t
*
p_handler
=
NULL
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
xml_elem_hnd_t
track_elements
[]
=
{
{
"location"
,
SIMPLE_CONTENT
,
{
NULL
}
},
...
...
@@ -413,11 +413,11 @@ static bool parse_track_node COMPLEX_INTERFACE
}
/* reset i_track_id */
p_
demux
->
p_
sys
->
i_track_id
=
-
1
;
p_sys
->
i_track_id
=
-
1
;
while
(
xml_ReaderRead
(
p_xml_reader
)
==
1
)
{
i_node
=
xml_ReaderNodeType
(
p_xml_reader
);
i
nt
i
_node
=
xml_ReaderNodeType
(
p_xml_reader
);
switch
(
i_node
)
{
case
XML_READER_NONE
:
...
...
@@ -497,29 +497,26 @@ static bool parse_track_node COMPLEX_INTERFACE
}
free
(
psz_uri
);
if
(
p_
demux
->
p_
sys
->
i_track_id
<
0
)
if
(
p_sys
->
i_track_id
<
0
)
{
input_item_AddSubItem
(
p_input_item
,
p_new_input
);
vlc_gc_decref
(
p_new_input
);
return
true
;
}
if
(
p_demux
->
p_sys
->
i_track_id
>=
p_demux
->
p_sys
->
i_tracklist_entries
)
if
(
p_sys
->
i_track_id
>=
p_sys
->
i_tracklist_entries
)
{
input_item_t
**
pp
;
pp
=
realloc
(
p_
demux
->
p_
sys
->
pp_tracklist
,
(
p_
demux
->
p_
sys
->
i_track_id
+
1
)
*
sizeof
(
*
pp
)
);
pp
=
realloc
(
p_sys
->
pp_tracklist
,
(
p_sys
->
i_track_id
+
1
)
*
sizeof
(
*
pp
)
);
if
(
!
pp
)
return
false
;
p_demux
->
p_sys
->
pp_tracklist
=
pp
;
while
(
p_demux
->
p_sys
->
i_track_id
>=
p_demux
->
p_sys
->
i_tracklist_entries
)
pp
[
p_demux
->
p_sys
->
i_tracklist_entries
++
]
=
NULL
;
p_sys
->
pp_tracklist
=
pp
;
while
(
p_sys
->
i_track_id
>=
p_sys
->
i_tracklist_entries
)
pp
[
p_sys
->
i_tracklist_entries
++
]
=
NULL
;
}
p_demux
->
p_sys
->
pp_tracklist
[
p_demux
->
p_sys
->
i_track_id
]
=
p_new_input
;
p_sys
->
pp_tracklist
[
p_sys
->
i_track_id
]
=
p_new_input
;
return
true
;
}
/* there MUST have been a start tag for that element name */
...
...
@@ -542,11 +539,11 @@ static bool parse_track_node COMPLEX_INTERFACE
* Last, psz_base should default to the XSPF resource
* location if missing (not the current working directory).
* -- Courmisch */
if
(
p_
demux
->
p_
sys
->
psz_base
&&
!
strstr
(
psz_value
,
"://"
)
)
if
(
p_sys
->
psz_base
&&
!
strstr
(
psz_value
,
"://"
)
)
{
char
*
psz_tmp
;
if
(
asprintf
(
&
psz_tmp
,
"%s%s"
,
p_demux
->
p_sys
->
psz_base
,
psz_value
)
==
-
1
)
if
(
asprintf
(
&
psz_tmp
,
"%s%s"
,
p_sys
->
psz_base
,
psz_value
)
==
-
1
)
{
FREE_ATT
();
return
NULL
;
...
...
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