pipewire: Follow-up with remoting pluging when releasing the head

Similarily to what the remoting plug-in does, explicitly call
weston_release_head() before removing the output list entry.

We do that to avoid lookup_pipewire_output() returning NULL and still
find out the pipewire_output.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
(cherry picked from commit 5db6d19e6bb4c72085104fcae9abf2f632d5f45a)
dev
Marius Vlad 2 years ago
parent 17f5a44f3b
commit eaa777b914
  1. 3
      pipewire/pipewire-plugin.c

@ -310,6 +310,8 @@ pipewire_output_destroy(struct weston_output *base_output)
struct pipewire_output *output = lookup_pipewire_output(base_output); struct pipewire_output *output = lookup_pipewire_output(base_output);
struct weston_mode *mode, *next; struct weston_mode *mode, *next;
weston_head_release(output->head);
wl_list_for_each_safe(mode, next, &base_output->mode_list, link) { wl_list_for_each_safe(mode, next, &base_output->mode_list, link) {
wl_list_remove(&mode->link); wl_list_remove(&mode->link);
free(mode); free(mode);
@ -318,7 +320,6 @@ pipewire_output_destroy(struct weston_output *base_output)
pw_stream_destroy(output->stream); pw_stream_destroy(output->stream);
wl_list_remove(&output->link); wl_list_remove(&output->link);
weston_head_release(output->head);
free(output->head); free(output->head);
free(output); free(output);
} }

Loading…
Cancel
Save