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)
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user