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
3172fde5
Commit
3172fde5
authored
Aug 19, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xspf: simplify and use free instead of FREENULL (not needed here).
parent
b18257a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+9
-10
No files found.
modules/demux/playlist/xspf.c
View file @
3172fde5
...
@@ -186,7 +186,8 @@ static bool parse_playlist_node COMPLEX_INTERFACE
...
@@ -186,7 +186,8 @@ static bool parse_playlist_node COMPLEX_INTERFACE
if
(
!
psz_name
||
!
psz_value
)
if
(
!
psz_name
||
!
psz_value
)
{
{
msg_Err
(
p_demux
,
"invalid xml stream @ <playlist>"
);
msg_Err
(
p_demux
,
"invalid xml stream @ <playlist>"
);
FREE_ATT
();
free
(
psz_name
);
free
(
psz_value
);
return
false
;
return
false
;
}
}
/* attribute: version */
/* attribute: version */
...
@@ -612,7 +613,6 @@ static bool set_item_info SIMPLE_INTERFACE
...
@@ -612,7 +613,6 @@ static bool set_item_info SIMPLE_INTERFACE
if
(
!
psz_name
||
!
psz_value
||
!
p_input
)
if
(
!
psz_name
||
!
psz_value
||
!
p_input
)
return
false
;
return
false
;
/* re-convert xml special characters inside psz_value */
/* re-convert xml special characters inside psz_value */
resolve_xml_special_chars
(
psz_value
);
resolve_xml_special_chars
(
psz_value
);
...
@@ -882,19 +882,18 @@ static bool parse_extitem_node COMPLEX_INTERFACE
...
@@ -882,19 +882,18 @@ static bool parse_extitem_node COMPLEX_INTERFACE
{
{
VLC_UNUSED
(
psz_element
);
VLC_UNUSED
(
psz_element
);
input_item_t
*
p_new_input
=
NULL
;
input_item_t
*
p_new_input
=
NULL
;
char
*
psz_name
=
NULL
;
char
*
psz_value
=
NULL
;
int
i_tid
=
-
1
;
int
i_tid
=
-
1
;
/* read all extension item attributes */
/* read all extension item attributes */
while
(
xml_ReaderNextAttr
(
p_xml_reader
)
==
VLC_SUCCESS
)
while
(
xml_ReaderNextAttr
(
p_xml_reader
)
==
VLC_SUCCESS
)
{
{
psz_name
=
xml_ReaderName
(
p_xml_reader
);
char
*
psz_name
=
xml_ReaderName
(
p_xml_reader
);
psz_value
=
xml_ReaderValue
(
p_xml_reader
);
char
*
psz_value
=
xml_ReaderValue
(
p_xml_reader
);
if
(
!
psz_name
||
!
psz_value
)
if
(
!
psz_name
||
!
psz_value
)
{
{
msg_Err
(
p_demux
,
"invalid xml stream @ <vlc:item>"
);
msg_Err
(
p_demux
,
"invalid xml stream @ <vlc:item>"
);
FREE_ATT
();
free
(
psz_name
);
free
(
psz_value
);
return
false
;
return
false
;
}
}
/* attribute: href */
/* attribute: href */
...
@@ -906,7 +905,8 @@ static bool parse_extitem_node COMPLEX_INTERFACE
...
@@ -906,7 +905,8 @@ static bool parse_extitem_node COMPLEX_INTERFACE
else
else
msg_Warn
(
p_demux
,
"invalid <vlc:item> attribute:
\"
%s
\"
"
,
psz_name
);
msg_Warn
(
p_demux
,
"invalid <vlc:item> attribute:
\"
%s
\"
"
,
psz_name
);
FREE_ATT
();
free
(
psz_name
);
free
(
psz_value
);
}
}
/* attribute href is mandatory */
/* attribute href is mandatory */
...
@@ -943,13 +943,12 @@ static bool parse_extitem_node COMPLEX_INTERFACE
...
@@ -943,13 +943,12 @@ static bool parse_extitem_node COMPLEX_INTERFACE
static
bool
skip_element
COMPLEX_INTERFACE
static
bool
skip_element
COMPLEX_INTERFACE
{
{
VLC_UNUSED
(
p_demux
);
VLC_UNUSED
(
p_input_item
);
VLC_UNUSED
(
p_demux
);
VLC_UNUSED
(
p_input_item
);
char
*
psz_endname
;
while
(
xml_ReaderRead
(
p_xml_reader
)
==
1
)
while
(
xml_ReaderRead
(
p_xml_reader
)
==
1
)
{
{
if
(
xml_ReaderNodeType
(
p_xml_reader
)
==
XML_READER_ENDELEM
)
if
(
xml_ReaderNodeType
(
p_xml_reader
)
==
XML_READER_ENDELEM
)
{
{
psz_endname
=
xml_ReaderName
(
p_xml_reader
);
char
*
psz_endname
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_endname
)
if
(
!
psz_endname
)
return
false
;
return
false
;
if
(
!
strcmp
(
psz_element
,
psz_endname
)
)
if
(
!
strcmp
(
psz_element
,
psz_endname
)
)
...
...
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