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
88655e00
Commit
88655e00
authored
Aug 22, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pulse: fix race in TimeGet()
Cork state could change asynchronously without the PA lock.
parent
18da36de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+13
-9
No files found.
modules/audio_output/pulse.c
View file @
88655e00
...
@@ -441,16 +441,20 @@ static int TimeGet(audio_output_t *aout, mtime_t *restrict delay)
...
@@ -441,16 +441,20 @@ static int TimeGet(audio_output_t *aout, mtime_t *restrict delay)
{
{
aout_sys_t
*
sys
=
aout
->
sys
;
aout_sys_t
*
sys
=
aout
->
sys
;
pa_stream
*
s
=
sys
->
stream
;
pa_stream
*
s
=
sys
->
stream
;
int
ret
=
-
1
;
if
(
pa_stream_is_corked
(
s
)
>
0
)
pa_threaded_mainloop_lock
(
sys
->
mainloop
);
return
-
1
;
/* latency is irrelevant if corked */
if
(
pa_stream_is_corked
(
s
)
<=
0
)
{
/* latency is relevant only if not corked */
mtime_t
delta
=
vlc_pa_get_latency
(
aout
,
sys
->
context
,
s
);
mtime_t
delta
=
vlc_pa_get_latency
(
aout
,
sys
->
context
,
s
);
if
(
delta
==
VLC_TS_INVALID
)
if
(
delta
!=
VLC_TS_INVALID
)
return
-
1
;
{
*
delay
=
delta
;
*
delay
=
delta
;
return
0
;
ret
=
0
;
}
}
pa_threaded_mainloop_unlock
(
sys
->
mainloop
);
return
ret
;
}
}
/* Memory free callback. The block_t address is in front of the data. */
/* Memory free callback. The block_t address is in front of the data. */
...
...
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