Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e86b51d0
Commit
e86b51d0
authored
May 12, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Depth is the word
parent
bf3e69e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
src/control/media_list_path.h
src/control/media_list_path.h
+14
-14
src/control/media_list_player.c
src/control/media_list_player.c
+7
-7
No files found.
src/control/media_list_path.h
View file @
e86b51d0
...
...
@@ -47,9 +47,9 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_with_root_index( i
}
/**************************************************************************
* path_de
epness
(Media List Player Internal)
* path_de
pth
(Media List Player Internal)
**************************************************************************/
static
inline
int
libvlc_media_list_path_de
epness
(
libvlc_media_list_path_t
path
)
static
inline
int
libvlc_media_list_path_de
pth
(
libvlc_media_list_path_t
path
)
{
int
i
;
for
(
i
=
0
;
path
[
i
]
!=
-
1
;
i
++
);
...
...
@@ -61,10 +61,10 @@ static inline int libvlc_media_list_path_deepness( libvlc_media_list_path_t path
**************************************************************************/
static
inline
void
libvlc_media_list_path_append
(
libvlc_media_list_path_t
*
p_path
,
int
index
)
{
int
old_de
epness
=
libvlc_media_list_path_deepness
(
*
p_path
);
*
p_path
=
realloc
(
*
p_path
,
sizeof
(
int
)
*
(
old_de
epness
+
2
));
*
p_path
[
old_de
epness
]
=
index
;
*
p_path
[
old_de
epness
+
1
]
=
-
1
;
int
old_de
pth
=
libvlc_media_list_path_depth
(
*
p_path
);
*
p_path
=
realloc
(
*
p_path
,
sizeof
(
int
)
*
(
old_de
pth
+
2
));
*
p_path
[
old_de
pth
]
=
index
;
*
p_path
[
old_de
pth
+
1
]
=
-
1
;
}
/**************************************************************************
...
...
@@ -73,11 +73,11 @@ static inline void libvlc_media_list_path_append( libvlc_media_list_path_t * p_p
static
inline
libvlc_media_list_path_t
libvlc_media_list_path_copy_by_appending
(
libvlc_media_list_path_t
path
,
int
index
)
{
libvlc_media_list_path_t
ret
;
int
old_de
epness
=
libvlc_media_list_path_deepness
(
path
);
ret
=
malloc
(
sizeof
(
int
)
*
(
old_de
epness
+
2
)
);
memcpy
(
ret
,
path
,
sizeof
(
int
)
*
(
old_de
epness
+
2
)
);
ret
[
old_de
epness
]
=
index
;
ret
[
old_de
epness
+
1
]
=
-
1
;
int
old_de
pth
=
libvlc_media_list_path_depth
(
path
);
ret
=
malloc
(
sizeof
(
int
)
*
(
old_de
pth
+
2
)
);
memcpy
(
ret
,
path
,
sizeof
(
int
)
*
(
old_de
pth
+
2
)
);
ret
[
old_de
pth
]
=
index
;
ret
[
old_de
pth
+
1
]
=
-
1
;
return
ret
;
}
...
...
@@ -87,9 +87,9 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_copy_by_appending(
static
inline
libvlc_media_list_path_t
libvlc_media_list_path_copy
(
libvlc_media_list_path_t
path
)
{
libvlc_media_list_path_t
ret
;
int
de
epness
=
libvlc_media_list_path_deepness
(
path
);
ret
=
malloc
(
sizeof
(
int
)
*
(
de
epness
+
1
)
);
memcpy
(
ret
,
path
,
sizeof
(
int
)
*
(
de
epness
+
1
)
);
int
de
pth
=
libvlc_media_list_path_depth
(
path
);
ret
=
malloc
(
sizeof
(
int
)
*
(
de
pth
+
1
)
);
memcpy
(
ret
,
path
,
sizeof
(
int
)
*
(
de
pth
+
1
)
);
return
ret
;
}
...
...
src/control/media_list_player.c
View file @
e86b51d0
...
...
@@ -64,23 +64,23 @@ get_next_path( libvlc_media_list_player_t * p_mlp )
p_mlp
->
p_mlist
,
p_mlp
->
current_playing_item_path
);
int
de
epness
=
libvlc_media_list_path_deepness
(
p_mlp
->
current_playing_item_path
);
if
(
de
epness
<
1
||
!
p_parent_of_playing_item
)
int
de
pth
=
libvlc_media_list_path_depth
(
p_mlp
->
current_playing_item_path
);
if
(
de
pth
<
1
||
!
p_parent_of_playing_item
)
return
NULL
;
ret
=
libvlc_media_list_path_copy
(
p_mlp
->
current_playing_item_path
);
while
(
ret
[
de
epness
-
1
]
>=
libvlc_media_list_count
(
p_parent_of_playing_item
,
NULL
)
)
while
(
ret
[
de
pth
-
1
]
>=
libvlc_media_list_count
(
p_parent_of_playing_item
,
NULL
)
)
{
de
epness
--
;
if
(
de
epness
<=
0
)
de
pth
--
;
if
(
de
pth
<=
0
)
{
free
(
ret
);
libvlc_media_list_release
(
p_parent_of_playing_item
);
return
NULL
;
}
ret
[
de
epness
]
=
-
1
;
ret
[
de
epness
-
1
]
++
;
ret
[
de
pth
]
=
-
1
;
ret
[
de
pth
-
1
]
++
;
p_parent_of_playing_item
=
libvlc_media_list_parentlist_at_path
(
p_mlp
->
p_mlist
,
ret
);
...
...
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