mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
cork-on-phone: Handle sink-inputs with NULL sinks
It's possible that by the time we receive the unlink hook, the given sink-input's sink is set to NULL. Handle this gracefully.
This commit is contained in:
parent
77da2c4bcf
commit
628137a628
1 changed files with 3 additions and 0 deletions
|
|
@ -138,6 +138,9 @@ static pa_hook_result_t process(struct userdata *u, pa_sink_input *i, pa_bool_t
|
||||||
!pa_streq(role, "video"))
|
!pa_streq(role, "video"))
|
||||||
return PA_HOOK_OK;
|
return PA_HOOK_OK;
|
||||||
|
|
||||||
|
if (!i->sink)
|
||||||
|
return PA_HOOK_OK;
|
||||||
|
|
||||||
cork = shall_cork(i->sink, create ? NULL : i);
|
cork = shall_cork(i->sink, create ? NULL : i);
|
||||||
apply_cork(u, i->sink, create ? NULL : i, cork);
|
apply_cork(u, i->sink, create ? NULL : i, cork);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue