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
a9c24573
Commit
a9c24573
authored
Jun 15, 2005
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/playlist/playlist.c: Fixed playlist_vaControl not to segfault when
it is called with an invalid playlist item.
parent
79718770
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
src/playlist/playlist.c
src/playlist/playlist.c
+18
-7
No files found.
src/playlist/playlist.c
View file @
a9c24573
...
...
@@ -288,6 +288,8 @@ int playlist_Control( playlist_t * p_playlist, int i_query, ... )
int
playlist_vaControl
(
playlist_t
*
p_playlist
,
int
i_query
,
va_list
args
)
{
playlist_view_t
*
p_view
;
playlist_item_t
*
p_item
,
*
p_node
;
int
i_view
;
vlc_value_t
val
;
#ifdef PLAYLIST_PROFILE
...
...
@@ -307,11 +309,13 @@ int playlist_vaControl( playlist_t * p_playlist, int i_query, va_list args )
break
;
case
PLAYLIST_ITEMPLAY
:
p_item
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
if
(
p_item
==
NULL
||
p_item
->
input
.
psz_uri
==
NULL
)
return
VLC_EGENERIC
;
p_playlist
->
status
.
i_status
=
PLAYLIST_RUNNING
;
p_playlist
->
request
.
i_skip
=
0
;
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
p_playlist
->
request
.
p_item
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
p_playlist
->
request
.
p_item
=
p_item
;
p_playlist
->
request
.
i_view
=
p_playlist
->
status
.
i_view
;
p_view
=
playlist_ViewFind
(
p_playlist
,
p_playlist
->
status
.
i_view
);
if
(
p_view
)
...
...
@@ -325,14 +329,21 @@ int playlist_vaControl( playlist_t * p_playlist, int i_query, va_list args )
break
;
case
PLAYLIST_VIEWPLAY
:
i_view
=
(
int
)
va_arg
(
args
,
int
);
p_node
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
p_item
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
if
(
p_node
==
NULL
||
p_item
==
NULL
||
p_item
->
input
.
psz_uri
==
NULL
)
{
p_playlist
->
status
.
i_status
=
PLAYLIST_STOPPED
;
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
return
VLC_SUCCESS
;
}
p_playlist
->
status
.
i_status
=
PLAYLIST_RUNNING
;
p_playlist
->
request
.
i_skip
=
0
;
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
p_playlist
->
request
.
i_view
=
(
int
)
va_arg
(
args
,
int
);
p_playlist
->
request
.
p_node
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
p_playlist
->
request
.
p_item
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
p_playlist
->
request
.
i_view
=
i_view
;
p_playlist
->
request
.
p_node
=
p_node
;
p_playlist
->
request
.
p_item
=
p_item
;
/* If we select a node, play only it.
* If we select an item, continue */
...
...
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