mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 05:38:58 +00:00
pulsesink: avoid segfault when shutting down
when we are shutting down, we might still receive state updates from pulseaudio but since we are unparented we should not do anything with the NULL parent anymore.
This commit is contained in:
parent
caec8d9837
commit
55b5e2e3f3
1 changed files with 5 additions and 0 deletions
|
@ -306,6 +306,11 @@ gst_pulsering_context_state_cb (pa_context * c, void *userdata)
|
|||
state = pa_context_get_state (c);
|
||||
GST_LOG_OBJECT (psink, "got new context state %d", state);
|
||||
|
||||
/* psink can be null when we are shutting down and the ringbuffer is already
|
||||
* unparented */
|
||||
if (psink == NULL)
|
||||
return;
|
||||
|
||||
switch (state) {
|
||||
case PA_CONTEXT_READY:
|
||||
case PA_CONTEXT_TERMINATED:
|
||||
|
|
Loading…
Reference in a new issue