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
5a234320
Commit
5a234320
authored
Mar 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: do not mix and match condidition variable and mutex pairings
parent
355ec9f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/input/decoder.c
src/input/decoder.c
+6
-1
No files found.
src/input/decoder.c
View file @
5a234320
...
...
@@ -89,6 +89,7 @@ struct decoder_owner_sys_t
vlc_mutex_t
lock
;
vlc_cond_t
wait_request
;
vlc_cond_t
wait_acknowledge
;
vlc_cond_t
wait_fifo
;
/* TODO: merge with wait_acknowledge */
/* -- These variables need locking on write(only) -- */
audio_output_t
*
p_aout
;
...
...
@@ -1432,6 +1433,8 @@ static void *DecoderThread( void *p_data )
vlc_fifo_CleanupPush
(
p_owner
->
p_fifo
);
vlc_cond_signal
(
&
p_owner
->
wait_acknowledge
);
vlc_cond_signal
(
&
p_owner
->
wait_fifo
);
while
(
vlc_fifo_IsEmpty
(
p_owner
->
p_fifo
)
)
{
if
(
p_owner
->
b_draining
)
...
...
@@ -1591,6 +1594,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
vlc_mutex_init
(
&
p_owner
->
lock
);
vlc_cond_init
(
&
p_owner
->
wait_request
);
vlc_cond_init
(
&
p_owner
->
wait_acknowledge
);
vlc_cond_init
(
&
p_owner
->
wait_fifo
);
p_owner
->
b_fmt_description
=
false
;
p_owner
->
p_description
=
NULL
;
...
...
@@ -1703,6 +1707,7 @@ static void DeleteDecoder( decoder_t * p_dec )
vlc_object_release
(
p_owner
->
p_packetizer
);
}
vlc_cond_destroy
(
&
p_owner
->
wait_fifo
);
vlc_cond_destroy
(
&
p_owner
->
wait_acknowledge
);
vlc_cond_destroy
(
&
p_owner
->
wait_request
);
vlc_mutex_destroy
(
&
p_owner
->
lock
);
...
...
@@ -1873,7 +1878,7 @@ void input_DecoderDecode( decoder_t *p_dec, block_t *p_block, bool b_do_pace )
* Locking is not necessary as b_waiting is only read, not written by
* the decoder thread. */
while
(
vlc_fifo_GetCount
(
p_owner
->
p_fifo
)
>=
10
)
vlc_fifo_WaitCond
(
p_owner
->
p_fifo
,
&
p_owner
->
wait_
acknowledge
);
vlc_fifo_WaitCond
(
p_owner
->
p_fifo
,
&
p_owner
->
wait_
fifo
);
}
vlc_fifo_QueueUnlocked
(
p_owner
->
p_fifo
,
p_block
);
...
...
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