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
4bd079da
Commit
4bd079da
authored
Oct 30, 2006
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some sanity checking and extra locking to guard against concurrent access patterns in core.
parent
65382e4f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
src/input/input.c
src/input/input.c
+10
-7
src/playlist/item-ext.c
src/playlist/item-ext.c
+1
-1
src/playlist/playlist.c
src/playlist/playlist.c
+5
-0
No files found.
src/input/input.c
View file @
4bd079da
...
...
@@ -406,14 +406,17 @@ void input_StopThread( input_thread_t *p_input )
*/
void
input_DestroyThread
(
input_thread_t
*
p_input
)
{
/* Join the thread */
vlc_thread_join
(
p_input
);
if
(
p_input
)
{
/* Join the thread */
vlc_thread_join
(
p_input
);
/* Delete input lock (only after thread joined) */
vlc_mutex_destroy
(
&
p_input
->
lock_control
);
/* Delete input lock (only after thread joined) */
vlc_mutex_destroy
(
&
p_input
->
lock_control
);
/* TODO: maybe input_DestroyThread should also delete p_input instead
* of the playlist but I'm not sure if it's possible */
/* TODO: maybe input_DestroyThread should also delete p_input instead
* of the playlist but I'm not sure if it's possible */
}
}
/*****************************************************************************
...
...
@@ -423,13 +426,13 @@ void input_DestroyThread( input_thread_t *p_input )
*****************************************************************************/
static
int
Run
(
input_thread_t
*
p_input
)
{
/* Signal that the thread is launched */
vlc_thread_ready
(
p_input
);
if
(
Init
(
p_input
,
VLC_FALSE
)
)
{
/* If we failed, wait before we are killed, and exit */
p_input
->
b_error
=
VLC_TRUE
;
/* Signal that the thread is launched */
Error
(
p_input
);
...
...
src/playlist/item-ext.c
View file @
4bd079da
...
...
@@ -734,7 +734,7 @@ int playlist_Clear( playlist_t * p_playlist )
int
i
;
for
(
i
=
p_playlist
->
i_size
;
i
>
0
;
i
--
)
{
playlist_Delete
(
p_playlist
,
p_playlist
->
pp_items
[
0
]
->
input
.
i_id
);
playlist_
Lock
Delete
(
p_playlist
,
p_playlist
->
pp_items
[
0
]
->
input
.
i_id
);
}
for
(
i
=
0
;
i
<
p_playlist
->
i_views
;
i
++
)
{
...
...
src/playlist/playlist.c
View file @
4bd079da
...
...
@@ -657,6 +657,8 @@ static void RunThread ( playlist_t *p_playlist )
/* Destroy input */
input_DestroyThread
(
p_input
);
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
/* Unlink current input
* (_after_ input_DestroyThread for vout garbage collector) */
vlc_object_detach
(
p_input
);
...
...
@@ -796,6 +798,9 @@ static void RunThread ( playlist_t *p_playlist )
/* Destroy input */
input_DestroyThread
(
p_input
);
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
/* Unlink current input (_after_ input_DestroyThread for vout
* garbage collector)*/
vlc_object_detach
(
p_input
);
...
...
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