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
ad22a4a4
Commit
ad22a4a4
authored
Aug 25, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shoutcast: fix NULL deref on error
parent
44b7c126
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+25
-17
No files found.
modules/demux/playlist/shoutcast.c
View file @
ad22a4a4
...
...
@@ -314,28 +314,36 @@ static int DemuxStation( demux_t *p_demux, xml_reader_t *p_xml_reader,
}
/* Create the item */
input_item_t
*
p_input
;
resolve_xml_special_chars
(
psz_mrl
);
p_input
=
input_item_New
(
psz_mrl
,
psz_name
);
input_item_CopyOptions
(
p_input_node
->
p_item
,
p_input
);
free
(
psz_mrl
);
input_item_t
*
p_input
=
NULL
;
if
(
likely
(
psz_mrl
!=
NULL
)
)
{
resolve_xml_special_chars
(
psz_mrl
);
p_input
=
input_item_New
(
psz_mrl
,
psz_name
);
free
(
psz_mrl
);
}
if
(
likely
(
p_input
!=
NULL
)
)
{
input_item_CopyOptions
(
p_input_node
->
p_item
,
p_input
);
#define SADD_INFO( type, field ) \
if( field ) \
input_item_AddInfo( p_input, _("Shoutcast"), \
vlc_gettext(type), "%s", field )
SADD_INFO
(
N_
(
"Mime"
),
psz_mt
);
SADD_INFO
(
N_
(
"Bitrate"
),
psz_br
);
SADD_INFO
(
N_
(
"Listeners"
),
psz_lc
);
SADD_INFO
(
N_
(
"Load"
),
psz_load
);
if
(
psz_genre
)
input_item_SetGenre
(
p_input
,
psz_genre
);
if
(
psz_ct
)
input_item_SetNowPlaying
(
p_input
,
psz_ct
);
if
(
psz_rt
)
input_item_SetRating
(
p_input
,
psz_rt
);
input_item_node_AppendItem
(
p_input_node
,
p_input
);
vlc_gc_decref
(
p_input
);
SADD_INFO
(
N_
(
"Mime"
),
psz_mt
);
SADD_INFO
(
N_
(
"Bitrate"
),
psz_br
);
SADD_INFO
(
N_
(
"Listeners"
),
psz_lc
);
SADD_INFO
(
N_
(
"Load"
),
psz_load
);
if
(
psz_genre
)
input_item_SetGenre
(
p_input
,
psz_genre
);
if
(
psz_ct
)
input_item_SetNowPlaying
(
p_input
,
psz_ct
);
if
(
psz_rt
)
input_item_SetRating
(
p_input
,
psz_rt
);
input_item_node_AppendItem
(
p_input_node
,
p_input
);
vlc_gc_decref
(
p_input
);
}
FREENULL
(
psz_base
);
FREENULL
(
psz_name
);
FREENULL
(
psz_mt
);
...
...
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