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
ffba3da3
Commit
ffba3da3
authored
Aug 16, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux_shoutcast: cleaning.
parent
1938cc4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
22 deletions
+20
-22
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+20
-22
No files found.
modules/demux/playlist/shoutcast.c
View file @
ffba3da3
...
...
@@ -82,6 +82,7 @@ static int Demux( demux_t *p_demux )
xml_t
*
p_xml
;
xml_reader_t
*
p_xml_reader
=
NULL
;
char
*
psz_eltname
=
NULL
;
int
i_ret
=
-
1
;
INIT_PLAYLIST_STUFF
;
p_xml
=
xml_Create
(
p_demux
);
...
...
@@ -123,13 +124,7 @@ static int Demux( demux_t *p_demux )
goto
error
;
}
if
(
p_xml_reader
)
xml_ReaderDelete
(
p_xml
,
p_xml_reader
);
if
(
p_xml
)
xml_Delete
(
p_xml
);
free
(
psz_eltname
);
HANDLE_PLAY_AND_RELEASE
;
return
0
;
/* Needed for correct operation of go back */
i_ret
=
0
;
/* Needed for correct operation of go back */
error:
if
(
p_xml_reader
)
...
...
@@ -138,7 +133,7 @@ error:
xml_Delete
(
p_xml
);
free
(
psz_eltname
);
HANDLE_PLAY_AND_RELEASE
;
return
-
1
;
return
i_ret
;
}
#define GET_VALUE( a ) \
...
...
@@ -155,25 +150,23 @@ static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
input_item_t
*
p_current_input
)
{
char
*
psz_name
=
NULL
;
/* genre name */
int
i_ret
=
-
1
;
while
(
xml_ReaderRead
(
p_xml_reader
)
==
1
)
{
int
i_type
;
// Get the node type
i_type
=
xml_ReaderNodeType
(
p_xml_reader
);
switch
(
i_type
)
switch
(
xml_ReaderNodeType
(
p_xml_reader
)
)
{
// Error
case
-
1
:
return
-
1
;
break
;
goto
error
;
case
XML_READER_STARTELEM
:
{
// Read the element name
char
*
psz_eltname
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_eltname
)
return
-
1
;
if
(
!
psz_eltname
)
goto
error
;
if
(
!
strcmp
(
psz_eltname
,
"genre"
)
)
{
...
...
@@ -185,11 +178,10 @@ static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
xml_ReaderValue
(
p_xml_reader
);
if
(
!
psz_attrname
||
!
psz_attrvalue
)
{
FREENULL
(
psz_attrname
);
FREENULL
(
psz_attrvalue
);
free
(
psz_eltname
);
/*FIXME: isn't return a bit too much. what about break*/
return
-
1
;
free
(
psz_attrname
);
free
(
psz_attrvalue
);
free
(
psz_eltname
);
break
;
}
GET_VALUE
(
name
)
...
...
@@ -215,7 +207,9 @@ static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
{
// Read the element name
char
*
psz_eltname
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_eltname
)
return
-
1
;
if
(
!
psz_eltname
)
goto
error
;
if
(
!
strcmp
(
psz_eltname
,
"genre"
)
)
{
char
*
psz_mrl
;
...
...
@@ -236,7 +230,11 @@ static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
}
}
}
return
0
;
i_ret
=
0
;
error:
free
(
psz_name
);
return
i_ret
;
}
/* radio stations:
...
...
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