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
eff236e4
Commit
eff236e4
authored
Mar 25, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLM: use cancellation instead of alive check, simplify
parent
5122100f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
src/input/vlm.c
src/input/vlm.c
+7
-12
No files found.
src/input/vlm.c
View file @
eff236e4
...
...
@@ -222,7 +222,7 @@ void vlm_Delete( vlm_t *p_vlm )
TAB_CLEAN
(
p_vlm
->
i_schedule
,
p_vlm
->
schedule
);
vlc_mutex_unlock
(
&
p_vlm
->
lock
);
vlc_
object_kill
(
p_vlm
);
vlc_
cancel
(
p_vlm
->
thread
);
if
(
p_vlm
->
p_vod
)
{
...
...
@@ -233,12 +233,6 @@ void vlm_Delete( vlm_t *p_vlm )
libvlc_priv
(
p_vlm
->
p_libvlc
)
->
p_vlm
=
NULL
;
vlc_mutex_unlock
(
&
vlm_mutex
);
vlc_mutex_lock
(
&
p_vlm
->
lock_manage
);
p_vlm
->
input_state_changed
=
true
;
vlc_cond_signal
(
&
p_vlm
->
wait_manage
);
vlc_mutex_unlock
(
&
p_vlm
->
lock_manage
);
/*vlc_cancel( p_vlm->thread ); */
vlc_join
(
p_vlm
->
thread
,
NULL
);
vlc_cond_destroy
(
&
p_vlm
->
wait_manage
);
...
...
@@ -400,16 +394,16 @@ static void* Manage( void* p_object )
mtime_t
i_time
;
mtime_t
i_nextschedule
=
0
;
int
canc
=
vlc_savecancel
();
i_lastcheck
=
vlm_Date
();
while
(
vlc_object_alive
(
vlm
)
)
for
(
;;
)
{
char
**
ppsz_scheduled_commands
=
NULL
;
int
i_scheduled_commands
=
0
;
bool
scheduled_command
=
false
;
vlc_mutex_lock
(
&
vlm
->
lock_manage
);
mutex_cleanup_push
(
&
vlm
->
lock_manage
);
while
(
!
vlm
->
input_state_changed
&&
!
scheduled_command
)
{
if
(
i_nextschedule
)
...
...
@@ -418,7 +412,9 @@ static void* Manage( void* p_object )
vlc_cond_wait
(
&
vlm
->
wait_manage
,
&
vlm
->
lock_manage
);
}
vlm
->
input_state_changed
=
false
;
vlc_mutex_unlock
(
&
vlm
->
lock_manage
);
vlc_cleanup_run
(
);
int
canc
=
vlc_savecancel
();
/* destroy the inputs that wants to die, and launch the next input */
vlc_mutex_lock
(
&
vlm
->
lock
);
for
(
i
=
0
;
i
<
vlm
->
i_media
;
i
++
)
...
...
@@ -518,10 +514,9 @@ static void* Manage( void* p_object )
i_lastcheck
=
i_time
;
vlc_mutex_unlock
(
&
vlm
->
lock
);
vlc_restorecancel
(
canc
);
}
vlc_restorecancel
(
canc
);
return
NULL
;
}
...
...
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