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
1938cc4e
Commit
1938cc4e
authored
Aug 16, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist demux: no need to strdup the string here.
parent
c2538e26
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
modules/demux/playlist/b4s.c
modules/demux/playlist/b4s.c
+10
-10
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+6
-4
No files found.
modules/demux/playlist/b4s.c
View file @
1938cc4e
...
@@ -200,15 +200,15 @@ static int Demux( demux_t *p_demux )
...
@@ -200,15 +200,15 @@ static int Demux( demux_t *p_demux )
if
(
!
strcmp
(
psz_elname
,
"entry"
)
&&
if
(
!
strcmp
(
psz_elname
,
"entry"
)
&&
!
strcmp
(
psz_name
,
"Playstring"
)
)
!
strcmp
(
psz_name
,
"Playstring"
)
)
{
{
psz_mrl
=
strdup
(
psz_value
)
;
psz_mrl
=
psz_value
;
}
}
else
else
{
{
msg_Warn
(
p_demux
,
"unexpected attribure %s in element %s"
,
msg_Warn
(
p_demux
,
"unexpected attribure %s in element %s"
,
psz_name
,
psz_elname
);
psz_name
,
psz_elname
);
free
(
psz_value
);
}
}
free
(
psz_name
);
free
(
psz_name
);
free
(
psz_value
);
}
}
break
;
break
;
}
}
...
@@ -222,34 +222,34 @@ static int Demux( demux_t *p_demux )
...
@@ -222,34 +222,34 @@ static int Demux( demux_t *p_demux )
}
}
if
(
!
strcmp
(
psz_elname
,
"Name"
)
)
if
(
!
strcmp
(
psz_elname
,
"Name"
)
)
{
{
psz_name
=
strdup
(
psz_text
)
;
psz_name
=
psz_text
;
}
}
else
if
(
!
strcmp
(
psz_elname
,
"Genre"
)
)
else
if
(
!
strcmp
(
psz_elname
,
"Genre"
)
)
{
{
psz_genre
=
strdup
(
psz_text
)
;
psz_genre
=
psz_text
;
}
}
else
if
(
!
strcmp
(
psz_elname
,
"Nowplaying"
)
)
else
if
(
!
strcmp
(
psz_elname
,
"Nowplaying"
)
)
{
{
psz_now
=
strdup
(
psz_text
)
;
psz_now
=
psz_text
;
}
}
else
if
(
!
strcmp
(
psz_elname
,
"Listeners"
)
)
else
if
(
!
strcmp
(
psz_elname
,
"Listeners"
)
)
{
{
psz_listeners
=
strdup
(
psz_text
)
;
psz_listeners
=
psz_text
;
}
}
else
if
(
!
strcmp
(
psz_elname
,
"Bitrate"
)
)
else
if
(
!
strcmp
(
psz_elname
,
"Bitrate"
)
)
{
{
psz_bitrate
=
strdup
(
psz_text
)
;
psz_bitrate
=
psz_text
;
}
}
else
if
(
!
strcmp
(
psz_elname
,
""
)
)
else
if
(
!
strcmp
(
psz_elname
,
""
)
)
{
{
;
free
(
psz_text
)
;
}
}
else
else
{
{
msg_Warn
(
p_demux
,
"unexpected text in element '%s'"
,
msg_Warn
(
p_demux
,
"unexpected text in element '%s'"
,
psz_elname
);
psz_elname
);
}
free
(
psz_text
);
free
(
psz_text
);
}
break
;
break
;
}
}
// End element
// End element
...
@@ -281,7 +281,7 @@ static int Demux( demux_t *p_demux )
...
@@ -281,7 +281,7 @@ static int Demux( demux_t *p_demux )
FREENULL
(
psz_now
);
FREENULL
(
psz_now
);
}
}
free
(
psz_elname
);
free
(
psz_elname
);
psz_elname
=
strdup
(
""
);
psz_elname
=
strdup
(
""
);
break
;
break
;
}
}
...
...
modules/demux/playlist/xspf.c
View file @
1938cc4e
...
@@ -716,19 +716,21 @@ static bool parse_extension_node COMPLEX_INTERFACE
...
@@ -716,19 +716,21 @@ static bool parse_extension_node COMPLEX_INTERFACE
if
(
!
strcmp
(
psz_name
,
"title"
)
)
if
(
!
strcmp
(
psz_name
,
"title"
)
)
{
{
resolve_xml_special_chars
(
psz_value
);
resolve_xml_special_chars
(
psz_value
);
psz_title
=
strdup
(
psz_value
)
;
psz_title
=
psz_value
;
}
}
/* extension attribute: application */
/* extension attribute: application */
else
if
(
!
strcmp
(
psz_name
,
"application"
)
)
else
if
(
!
strcmp
(
psz_name
,
"application"
)
)
{
{
psz_application
=
strdup
(
psz_value
)
;
psz_application
=
psz_value
;
}
}
/* unknown attribute */
/* unknown attribute */
else
else
{
msg_Warn
(
p_demux
,
"invalid <%s> attribute:
\"
%s
\"
"
,
psz_element
,
msg_Warn
(
p_demux
,
"invalid <%s> attribute:
\"
%s
\"
"
,
psz_element
,
psz_name
);
psz_name
);
FREE_VALUE
();
FREE_ATT
();
}
FREE_NAME
();
}
}
/* attribute title is mandatory except for <extension> */
/* attribute title is mandatory except for <extension> */
...
...
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