Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
f4bc3b96
Commit
f4bc3b96
authored
Feb 11, 2010
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlm: Remove the callback before joining the thread, and save a dead lock.
parent
3a4de92b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
src/input/vlm.c
src/input/vlm.c
+4
-12
No files found.
src/input/vlm.c
View file @
f4bc3b96
...
@@ -105,16 +105,6 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -105,16 +105,6 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_cmd,
}
}
vlm_SendEventMediaInstanceState
(
p_vlm
,
p_media
->
cfg
.
id
,
p_media
->
cfg
.
psz_name
,
psz_instance_name
,
var_GetInteger
(
p_input
,
"state"
)
);
vlm_SendEventMediaInstanceState
(
p_vlm
,
p_media
->
cfg
.
id
,
p_media
->
cfg
.
psz_name
,
psz_instance_name
,
var_GetInteger
(
p_input
,
"state"
)
);
// We have ourselves been triggering the stop event.
// No need to wake up our manage thread, because
// we'll join it just after the Stop().
vlc_mutex_lock
(
&
p_input
->
p
->
lock_control
);
bool
abort
=
p_input
->
p
->
b_abort
;
vlc_mutex_unlock
(
&
p_input
->
p
->
lock_control
);
if
(
abort
)
return
VLC_SUCCESS
;
vlc_mutex_lock
(
&
p_vlm
->
lock
);
vlc_mutex_lock
(
&
p_vlm
->
lock
);
vlc_cond_signal
(
&
p_vlm
->
wait
);
vlc_cond_signal
(
&
p_vlm
->
wait
);
vlc_mutex_unlock
(
&
p_vlm
->
lock
);
vlc_mutex_unlock
(
&
p_vlm
->
lock
);
...
@@ -860,13 +850,14 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc
...
@@ -860,13 +850,14 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc
{
{
input_resource_t
*
p_resource
;
input_resource_t
*
p_resource
;
var_DelCallback
(
p_instance
->
p_input
,
"intf-event"
,
InputEvent
,
p_media
);
input_Stop
(
p_input
,
true
);
input_Stop
(
p_input
,
true
);
vlc_thread_join
(
p_input
);
vlc_thread_join
(
p_input
);
p_resource
=
input_DetachResource
(
p_input
);
p_resource
=
input_DetachResource
(
p_input
);
input_resource_Delete
(
p_resource
);
input_resource_Delete
(
p_resource
);
var_DelCallback
(
p_instance
->
p_input
,
"intf-event"
,
InputEvent
,
p_media
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
vlm_SendEventMediaInstanceStopped
(
p_vlm
,
id
,
p_media
->
cfg
.
psz_name
);
vlm_SendEventMediaInstanceStopped
(
p_vlm
,
id
,
p_media
->
cfg
.
psz_name
);
...
@@ -945,12 +936,13 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
...
@@ -945,12 +936,13 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
var_DelCallback
(
p_instance
->
p_input
,
"intf-event"
,
InputEvent
,
p_media
);
input_Stop
(
p_input
,
true
);
input_Stop
(
p_input
,
true
);
vlc_thread_join
(
p_input
);
vlc_thread_join
(
p_input
);
p_instance
->
p_input_resource
=
input_DetachResource
(
p_input
);
p_instance
->
p_input_resource
=
input_DetachResource
(
p_input
);
var_DelCallback
(
p_instance
->
p_input
,
"intf-event"
,
InputEvent
,
p_media
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
if
(
!
p_instance
->
b_sout_keep
)
if
(
!
p_instance
->
b_sout_keep
)
...
...
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