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
62f9f6e8
Commit
62f9f6e8
authored
Oct 31, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PulseAudio: fix race when listing sinks
The stream might not exist. Regression from
e364643f
.
parent
10dd2acc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+6
-2
No files found.
modules/audio_output/pulse.c
View file @
62f9f6e8
...
...
@@ -134,6 +134,7 @@ static void sink_list_cb(pa_context *c, const pa_sink_info *i, int eol,
void
*
userdata
)
{
audio_output_t
*
aout
=
userdata
;
aout_sys_t
*
sys
=
aout
->
sys
;
vlc_value_t
val
,
text
;
if
(
eol
)
...
...
@@ -150,8 +151,11 @@ static void sink_list_cb(pa_context *c, const pa_sink_info *i, int eol,
/* FIXME: var_Change() can change the variable value if we remove the
* current value from the choice list, or if we add a choice while there
* was none. So force the correct value back. */
val
.
i_int
=
pa_stream_get_device_index
(
aout
->
sys
->
stream
);
var_Change
(
aout
,
"audio-device"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
if
(
sys
->
stream
!=
NULL
)
{
val
.
i_int
=
pa_stream_get_device_index
(
sys
->
stream
);
var_Change
(
aout
,
"audio-device"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
}
}
static
void
sink_info_cb
(
pa_context
*
c
,
const
pa_sink_info
*
i
,
int
eol
,
...
...
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