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
a607963a
Commit
a607963a
authored
Jan 16, 2011
by
Srikanth Raju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ML: Avoid deadlocks
parent
ff3b5572
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
modules/media_library/ml_watch.c
modules/media_library/ml_watch.c
+10
-6
No files found.
modules/media_library/ml_watch.c
View file @
a607963a
...
...
@@ -173,13 +173,9 @@ static void detachItemEvents( media_library_t *p_ml, input_item_t *p_item )
void
watch_Close
(
media_library_t
*
p_ml
)
{
playlist_t
*
p_pl
=
pl_Get
(
p_ml
);
var_DelCallback
(
p_pl
,
"item-current"
,
watch_PlaylistItemCurrent
,
p_ml
);
var_DelCallback
(
p_pl
,
"playlist-item-append"
,
watch_PlaylistItemAppend
,
p_ml
);
var_DelCallback
(
p_pl
,
"playlist-item-deleted"
,
watch_PlaylistItemDeleted
,
p_ml
);
/* Stop the watch thread and join in */
vlc_object_kill
(
p_ml
->
p_sys
->
p_watch
);
vlc_thread_join
(
p_ml
->
p_sys
->
p_watch
);
var_DelCallback
(
p_pl
,
"playlist-item-append"
,
watch_PlaylistItemAppend
,
p_ml
);
var_DelCallback
(
p_pl
,
"item-current"
,
watch_PlaylistItemCurrent
,
p_ml
);
/* Flush item list */
il_foreachhashlist
(
p_ml
->
p_sys
->
p_watch
->
p_hlist
,
p_elt
,
ixx
)
...
...
@@ -190,6 +186,10 @@ void watch_Close( media_library_t *p_ml )
}
item_list_destroy
(
p_ml
->
p_sys
->
p_watch
);
/* Stop the watch thread and join in */
vlc_object_kill
(
p_ml
->
p_sys
->
p_watch
);
vlc_thread_join
(
p_ml
->
p_sys
->
p_watch
);
/* Clear up other stuff */
vlc_mutex_destroy
(
&
p_ml
->
p_sys
->
p_watch
->
lock
);
vlc_cond_destroy
(
&
p_ml
->
p_sys
->
p_watch
->
cond
);
...
...
@@ -558,12 +558,16 @@ static void watch_ProcessAppendQueue( media_library_t* p_ml )
vlc_mutex_lock
(
&
p_wt
->
list_mutex
);
p_media
=
media_New
(
p_ml
,
i_media_id
,
ML_MEDIA
,
true
);
if
(
p_media
==
NULL
)
{
vlc_mutex_unlock
(
&
p_wt
->
list_mutex
);
continue
;
}
/* If duplicate, then it just continues */
i_ret
=
__watch_add_Item
(
p_ml
,
p_item
,
p_media
,
true
);
if
(
i_ret
!=
VLC_SUCCESS
)
{
ml_gc_decref
(
p_media
);
vlc_mutex_unlock
(
&
p_wt
->
list_mutex
);
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