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
3c7efc2e
Commit
3c7efc2e
authored
Jun 04, 2009
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: Fix a typo in a memcpy and constify.
Pointed by Laurent and Valgrind.
parent
03753799
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
src/control/media_list_path.h
src/control/media_list_path.h
+10
-10
No files found.
src/control/media_list_path.h
View file @
3c7efc2e
...
...
@@ -30,7 +30,7 @@ typedef int * libvlc_media_list_path_t; /* (Media List Player Internal) */
/**************************************************************************
* path_dump (Media List Player Internal)
**************************************************************************/
static
inline
void
libvlc_media_list_path_dump
(
libvlc_media_list_path_t
path
)
static
inline
void
libvlc_media_list_path_dump
(
const
libvlc_media_list_path_t
path
)
{
if
(
!
path
)
{
...
...
@@ -68,7 +68,7 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_with_root_index( i
/**************************************************************************
* path_depth (Media List Player Internal)
**************************************************************************/
static
inline
int
libvlc_media_list_path_depth
(
libvlc_media_list_path_t
path
)
static
inline
int
libvlc_media_list_path_depth
(
const
libvlc_media_list_path_t
path
)
{
int
i
;
for
(
i
=
0
;
path
[
i
]
!=
-
1
;
i
++
);
...
...
@@ -89,12 +89,12 @@ static inline void libvlc_media_list_path_append( libvlc_media_list_path_t * p_p
/**************************************************************************
* path_copy_by_appending (Media List Player Internal)
**************************************************************************/
static
inline
libvlc_media_list_path_t
libvlc_media_list_path_copy_by_appending
(
libvlc_media_list_path_t
path
,
int
index
)
static
inline
libvlc_media_list_path_t
libvlc_media_list_path_copy_by_appending
(
const
libvlc_media_list_path_t
path
,
int
index
)
{
libvlc_media_list_path_t
ret
;
int
old_depth
=
libvlc_media_list_path_depth
(
path
);
ret
=
malloc
(
sizeof
(
int
)
*
(
old_depth
+
2
)
);
memcpy
(
ret
,
path
,
sizeof
(
int
)
*
(
old_depth
+
2
)
);
ret
=
malloc
(
sizeof
(
int
)
*
(
old_depth
+
2
)
);
memcpy
(
ret
,
path
,
sizeof
(
int
)
*
old_depth
);
ret
[
old_depth
]
=
index
;
ret
[
old_depth
+
1
]
=
-
1
;
return
ret
;
...
...
@@ -103,7 +103,7 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_copy_by_appending(
/**************************************************************************
* path_copy (Media List Player Internal)
**************************************************************************/
static
inline
libvlc_media_list_path_t
libvlc_media_list_path_copy
(
libvlc_media_list_path_t
path
)
static
inline
libvlc_media_list_path_t
libvlc_media_list_path_copy
(
const
libvlc_media_list_path_t
path
)
{
libvlc_media_list_path_t
ret
;
int
depth
=
libvlc_media_list_path_depth
(
path
);
...
...
@@ -116,7 +116,7 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_copy( libvlc_media
* get_path_rec (Media List Player Internal)
**************************************************************************/
static
libvlc_media_list_path_t
get_path_rec
(
libvlc_media_list_path_t
path
,
libvlc_media_list_t
*
p_current_mlist
,
libvlc_media_t
*
p_searched_md
)
get_path_rec
(
const
libvlc_media_list_path_t
path
,
libvlc_media_list_t
*
p_current_mlist
,
libvlc_media_t
*
p_searched_md
)
{
int
i
,
count
;
count
=
libvlc_media_list_count
(
p_current_mlist
,
NULL
);
...
...
@@ -160,7 +160,7 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_of_item( libvlc_me
* item_at_path (Media List Player Internal)
**************************************************************************/
static
libvlc_media_t
*
libvlc_media_list_item_at_path
(
libvlc_media_list_t
*
p_mlist
,
libvlc_media_list_path_t
path
)
libvlc_media_list_item_at_path
(
libvlc_media_list_t
*
p_mlist
,
const
libvlc_media_list_path_t
path
)
{
libvlc_media_list_t
*
p_current_mlist
=
p_mlist
;
libvlc_media_t
*
p_md
=
NULL
;
...
...
@@ -193,7 +193,7 @@ libvlc_media_list_item_at_path( libvlc_media_list_t * p_mlist, libvlc_media_list
* parentlist_at_path (Media List Player Internal)
**************************************************************************/
static
libvlc_media_list_t
*
libvlc_media_list_parentlist_at_path
(
libvlc_media_list_t
*
p_mlist
,
libvlc_media_list_path_t
path
)
libvlc_media_list_parentlist_at_path
(
libvlc_media_list_t
*
p_mlist
,
const
libvlc_media_list_path_t
path
)
{
libvlc_media_list_t
*
p_current_mlist
=
p_mlist
;
libvlc_media_t
*
p_md
=
NULL
;
...
...
@@ -229,7 +229,7 @@ libvlc_media_list_parentlist_at_path( libvlc_media_list_t * p_mlist, libvlc_medi
* sublist_at_path (Media List Player Internal)
**************************************************************************/
static
libvlc_media_list_t
*
libvlc_media_list_sublist_at_path
(
libvlc_media_list_t
*
p_mlist
,
libvlc_media_list_path_t
path
)
libvlc_media_list_sublist_at_path
(
libvlc_media_list_t
*
p_mlist
,
const
libvlc_media_list_path_t
path
)
{
libvlc_media_list_t
*
ret
;
libvlc_media_t
*
p_md
=
libvlc_media_list_item_at_path
(
p_mlist
,
path
);
...
...
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