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
56fb673c
Commit
56fb673c
authored
May 08, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist_ram: fix memleaks and use "const char*" instead of "char*" whenever possible.
parent
80684e78
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
modules/demux/playlist/ram.c
modules/demux/playlist/ram.c
+9
-7
No files found.
modules/demux/playlist/ram.c
View file @
56fb673c
...
...
@@ -65,7 +65,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
void
ParseClipInfo
(
char
*
psz_clipinfo
,
char
**
ppsz_artist
,
char
**
ppsz_title
,
static
void
ParseClipInfo
(
c
onst
c
har
*
psz_clipinfo
,
char
**
ppsz_artist
,
char
**
ppsz_title
,
char
**
ppsz_album
,
char
**
ppsz_genre
,
char
**
ppsz_year
,
char
**
ppsz_cdnum
,
char
**
ppsz_comments
);
...
...
@@ -133,7 +133,7 @@ static inline void MaybeFromLocaleRep (char **str)
* @param s: input string
* @param i_strlen: length of the buffer
*/
static
c
har
*
SkipBlanks
(
char
*
s
,
size_t
i_strlen
)
static
c
onst
char
*
SkipBlanks
(
const
char
*
s
,
size_t
i_strlen
)
{
while
(
i_strlen
>
0
)
{
switch
(
*
s
)
...
...
@@ -158,7 +158,7 @@ static char *SkipBlanks(char *s, size_t i_strlen )
* @param i_strlen: length of the buffer
* @return time in seconds
*/
static
int
ParseTime
(
char
*
s
,
size_t
i_strlen
)
static
int
ParseTime
(
const
char
*
s
,
size_t
i_strlen
)
{
// need to parse hour:minutes:sec.fraction string
int
result
=
0
;
...
...
@@ -326,7 +326,7 @@ static int Demux( demux_t *p_demux )
psz_author
=
strdup
(
psz_value
);
else
if
(
!
strcmp
(
psz_param
,
"start"
)
)
{
i_start
=
ParseTime
(
strdup
(
psz_value
),
strlen
(
psz_value
)
);
i_start
=
ParseTime
(
psz_value
,
strlen
(
psz_value
)
);
char
*
temp
;
if
(
i_start
)
{
...
...
@@ -336,7 +336,7 @@ static int Demux( demux_t *p_demux )
}
else
if
(
!
strcmp
(
psz_param
,
"end"
)
)
{
i_stop
=
ParseTime
(
strdup
(
psz_value
)
,
strlen
(
psz_value
)
);
i_stop
=
ParseTime
(
psz_value
,
strlen
(
psz_value
)
);
char
*
temp
;
if
(
i_stop
)
{
...
...
@@ -435,16 +435,18 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
* @param ppsz_cdnum: Buffer to store cdnum
* @param ppsz_comments: Buffer to store comments
*/
static
void
ParseClipInfo
(
char
*
psz_clipinfo
,
char
**
ppsz_artist
,
char
**
ppsz_title
,
static
void
ParseClipInfo
(
c
onst
c
har
*
psz_clipinfo
,
char
**
ppsz_artist
,
char
**
ppsz_title
,
char
**
ppsz_album
,
char
**
ppsz_genre
,
char
**
ppsz_year
,
char
**
ppsz_cdnum
,
char
**
ppsz_comments
)
{
char
*
psz_option_next
,
*
psz_option_start
,
*
psz_param
,
*
psz_value
,
*
psz_suboption
;
char
*
psz_temp_clipinfo
=
strdup
(
psz_clipinfo
);
psz_option_start
=
psz_clipinfo
;
psz_option_start
=
strchr
(
psz_temp_clipinfo
,
'"'
);
if
(
!
psz_option_start
)
{
free
(
psz_temp_clipinfo
);
return
;
}
psz_option_start
++
;
psz_option_next
=
psz_option_start
;
...
...
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