Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
89e293c6
Commit
89e293c6
authored
May 09, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: use proper boolean instead of vlc_object_(kill|alive)
parent
72cae4dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
src/playlist/control.c
src/playlist/control.c
+1
-1
src/playlist/engine.c
src/playlist/engine.c
+1
-0
src/playlist/playlist_internal.h
src/playlist/playlist_internal.h
+1
-0
src/playlist/thread.c
src/playlist/thread.c
+5
-5
No files found.
src/playlist/control.c
View file @
89e293c6
...
...
@@ -107,7 +107,7 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
PL_ASSERT_LOCKED
;
if
(
!
vlc_object_alive
(
p_playlist
)
)
if
(
pl_priv
(
p_playlist
)
->
killed
)
return
VLC_EGENERIC
;
if
(
playlist_IsEmpty
(
p_playlist
)
&&
i_query
!=
PLAYLIST_STOP
)
...
...
src/playlist/engine.c
View file @
89e293c6
...
...
@@ -169,6 +169,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
VariablesInit
(
p_playlist
);
vlc_mutex_init
(
&
p
->
lock
);
vlc_cond_init
(
&
p
->
signal
);
p
->
killed
=
false
;
/* Initialise data structures */
pl_priv
(
p_playlist
)
->
i_last_playlist_id
=
0
;
...
...
src/playlist/playlist_internal.h
View file @
89e293c6
...
...
@@ -82,6 +82,7 @@ typedef struct playlist_private_t
vlc_thread_t
thread
;
/**< engine thread */
vlc_mutex_t
lock
;
/**< dah big playlist global lock */
vlc_cond_t
signal
;
/**< wakes up the playlist engine thread */
bool
killed
;
/**< playlist is shutting down */
int
i_last_playlist_id
;
/**< Last id to an item */
bool
b_reset_currently_playing
;
/** Reset current item array */
...
...
src/playlist/thread.c
View file @
89e293c6
...
...
@@ -75,7 +75,7 @@ void playlist_Deactivate( playlist_t *p_playlist )
msg_Dbg
(
p_playlist
,
"deactivating the playlist"
);
PL_LOCK
;
vlc_object_kill
(
p_playlist
)
;
p_sys
->
killed
=
true
;
vlc_cond_signal
(
&
p_sys
->
signal
);
PL_UNLOCK
;
...
...
@@ -454,7 +454,7 @@ static int LoopInput( playlist_t *p_playlist )
if
(
!
p_input
)
return
VLC_EGENERIC
;
if
(
(
p_sys
->
request
.
b_request
||
!
vlc_object_alive
(
p_playlist
)
)
&&
!
p_input
->
b_die
)
if
(
(
p_sys
->
request
.
b_request
||
p_sys
->
killed
)
&&
!
p_input
->
b_die
)
{
PL_DEBUG
(
"incoming request - stopping current input"
);
input_Stop
(
p_input
,
true
);
...
...
@@ -512,7 +512,7 @@ static void LoopRequest( playlist_t *p_playlist )
const
int
i_status
=
p_sys
->
request
.
b_request
?
p_sys
->
request
.
i_status
:
p_sys
->
status
.
i_status
;
if
(
i_status
==
PLAYLIST_STOPPED
||
!
vlc_object_alive
(
p_playlist
)
)
if
(
i_status
==
PLAYLIST_STOPPED
||
p_sys
->
killed
)
{
p_sys
->
status
.
i_status
=
PLAYLIST_STOPPED
;
...
...
@@ -530,7 +530,7 @@ static void LoopRequest( playlist_t *p_playlist )
}
else
{
if
(
vlc_object_alive
(
p_playlist
)
)
if
(
!
p_sys
->
killed
)
vlc_cond_wait
(
&
p_sys
->
signal
,
&
p_sys
->
lock
);
}
return
;
...
...
@@ -563,7 +563,7 @@ static void *Thread ( void *data )
playlist_private_t
*
p_sys
=
pl_priv
(
p_playlist
);
playlist_Lock
(
p_playlist
);
while
(
vlc_object_alive
(
p_playlist
)
||
p_sys
->
p_input
)
while
(
!
p_sys
->
killed
||
p_sys
->
p_input
)
{
/* FIXME: what's that ! */
if
(
p_sys
->
b_reset_currently_playing
&&
...
...
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