Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
9131dbf7
Commit
9131dbf7
authored
Sep 15, 2005
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coding style fixes and added comments
parent
5f4d054f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
modules/demux/playlist/b4s.c
modules/demux/playlist/b4s.c
+21
-8
No files found.
modules/demux/playlist/b4s.c
View file @
9131dbf7
...
...
@@ -49,7 +49,7 @@ struct demux_sys_t
*****************************************************************************/
static
int
Demux
(
demux_t
*
p_demux
);
static
int
Control
(
demux_t
*
p_demux
,
int
i_query
,
va_list
args
);
static
char
*
get_next_token
(
char
*
cur_string
);
static
char
*
GetNextToken
(
char
*
psz_
cur_string
);
static
int
IsWhitespace
(
char
*
psz_string
);
static
void
ShoutcastAdd
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_genre
,
playlist_item_t
*
p_bitrate
,
playlist_item_t
*
p_item
,
...
...
@@ -372,7 +372,7 @@ static int Demux( demux_t *p_demux )
/* split up the combined genre string form
shoutcast and add the individual genres */
while
(
psz_genreToken
&&
(
psz_otherToken
=
get_next_t
oken
(
psz_genreToken
)))
(
psz_otherToken
=
GetNextT
oken
(
psz_genreToken
)))
{
if
(
strlen
(
psz_genreToken
)
>
2
)
/* We dont want genres below 2 letters,
...
...
@@ -442,12 +442,25 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return
VLC_EGENERIC
;
}
static
char
*
get_next_token
(
char
*
cur_string
)
{
while
(
*
cur_string
&&
!
isspace
(
*
cur_string
))
cur_string
++
;
if
(
!*
cur_string
)
return
NULL
;
*
cur_string
++
=
'\0'
;
while
(
*
cur_string
&&
isspace
(
*
cur_string
))
cur_string
++
;
return
cur_string
;
/**
* Get a in-string pointer to the start of the next token from a
* string terminating the pointer returned by a previous call.
*
* \param psz_cur_string The string to search for the token from
* \return a pointer to withing psz_cur_string, or NULL if no token
* was found
* \note The returned pointer may contain more than one
* token, Run GetNextToken once more to terminate the token properly
*/
static
char
*
GetNextToken
(
char
*
psz_cur_string
)
{
while
(
*
psz_cur_string
&&
!
isspace
(
*
psz_cur_string
))
psz_cur_string
++
;
if
(
!*
psz_cur_string
)
return
NULL
;
*
psz_cur_string
++
=
'\0'
;
while
(
*
psz_cur_string
&&
isspace
(
*
psz_cur_string
))
psz_cur_string
++
;
return
psz_cur_string
;
}
static
int
IsWhitespace
(
char
*
psz_string
)
...
...
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