mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
filter-apply: Fix segfault with moving streams
process() may be called with a stream that doesn't have its sink/source set. This can happen if the proplist change callback is called when the stream is moving.
This commit is contained in:
parent
f8b57af2c8
commit
ee0a5d5014
1 changed files with 7 additions and 3 deletions
|
|
@ -417,14 +417,18 @@ static pa_hook_result_t process(struct userdata *u, pa_object *o, pa_bool_t is_s
|
|||
pa_bool_t done_something = FALSE;
|
||||
pa_sink *sink = NULL;
|
||||
pa_source *source = NULL;
|
||||
pa_module *module;
|
||||
pa_module *module = NULL;
|
||||
|
||||
if (is_sink_input) {
|
||||
sink = PA_SINK_INPUT(o)->sink;
|
||||
module = sink->module;
|
||||
|
||||
if (sink)
|
||||
module = sink->module;
|
||||
} else {
|
||||
source = PA_SOURCE_OUTPUT(o)->source;
|
||||
module = source->module;
|
||||
|
||||
if (source)
|
||||
module = source->module;
|
||||
}
|
||||
|
||||
/* If there is no sink/source yet, we can't do much */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue