Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
2e09a58d
Commit
2e09a58d
authored
Aug 10, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PulseAudio: clear all stream callbacks before disconnection
This should fix the infrequent assertions failures at exit.
parent
c6b07475
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+9
-19
No files found.
modules/audio_output/pulse.c
View file @
2e09a58d
...
...
@@ -831,30 +831,20 @@ static void Close (vlc_object_t *obj)
/* The callback takes mainloop lock, so it CANNOT be held here! */
var_DelCallback
(
aout
,
"audio-device"
,
StreamMove
,
s
);
var_Destroy
(
aout
,
"audio-device"
);
}
vlc_pa_lock
();
if
(
s
!=
NULL
)
{
pa_operation
*
op
;
pa_stream_disconnect
(
s
);
if
(
pa_stream_is_corked
(
s
)
>
0
)
/* Stream paused: discard all buffers */
op
=
pa_stream_flush
(
s
,
stream_success_cb
,
NULL
);
else
/* Stream playing: wait until buffers are played */
op
=
pa_stream_drain
(
s
,
stream_success_cb
,
NULL
);
if
(
likely
(
op
!=
NULL
))
{
#ifdef LIBPULSE_GETS_A_CLUE
while
(
pa_operation_get_state
(
op
)
==
PA_OPERATION_RUNNING
)
vlc_pa_wait
();
#endif
pa_operation_unref
(
op
);
}
/* Clear all callbacks */
pa_stream_set_state_callback
(
s
,
NULL
,
NULL
);
pa_stream_set_latency_update_callback
(
s
,
NULL
,
aout
);
pa_stream_set_moved_callback
(
s
,
NULL
,
aout
);
pa_stream_set_overflow_callback
(
s
,
NULL
,
aout
);
pa_stream_set_started_callback
(
s
,
NULL
,
aout
);
pa_stream_set_suspended_callback
(
s
,
NULL
,
aout
);
pa_stream_set_underflow_callback
(
s
,
NULL
,
aout
);
pa_stream_disconnect
(
s
);
pa_stream_unref
(
s
);
}
vlc_pa_unlock
();
vlc_pa_disconnect
(
obj
,
ctx
);
free
(
sys
);
...
...
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