Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
454
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
9131dbf7
Commit
9131dbf7
authored
19 years ago
by
sigmunau
Browse files
Options
Downloads
Patches
Plain Diff
Coding style fixes and added comments
parent
5f4d054f
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/demux/playlist/b4s.c
+21
-8
21 additions, 8 deletions
modules/demux/playlist/b4s.c
with
21 additions
and
8 deletions
modules/demux/playlist/b4s.c
+
21
−
8
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
*
g
et
_n
ext
_t
oken
(
char
*
cur_string
);
static
char
*
G
et
N
ext
T
oken
(
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
=
g
et
_n
ext
_t
oken
(
psz_genreToken
)))
(
psz_otherToken
=
G
et
N
ext
T
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment