mirror of
https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
synced 2024-11-23 01:10:40 -05:00
f3806ad5df
GvcMixerCards are not removed when reconnecting to PA server, which causes duplicate card entries to appear on PA restart. Moreover, the old GvcMixerCard instances have pointers to the old already freed pa_context, resulting to use-after-free on operations. Duplicate entries are also caused by sink/source removal on reconnect not sending right signals. Make it clean up all Gvc objects as if we got subscribe remove events for them all: Use remove_sink/remove_source to remove sinks/sources so that the right signals are emitted. Remove cards using remove_card, so that also they get cleaned up. Remove also any leftover GvcMixerUIDevices. Move cleanup of streams etc. before pa_context unref, so that we free the objects referring the pa_context before freeing the context. This fixes gnome-control-center crashing when PA server is restarted, and one e.g. tries to do something that ends up in gvc_mixer_card_change_profile such as selecting output device with port in different profile. It also fixes duplicate entries appearing in the device lists on Pipewire restart (they don't appear with Pulseaudio since PA device IDs don't change on restart). It should also fix similar crashes in gnome-shell. |
||
---|---|---|
.gitlab-ci | ||
.gitignore | ||
.gitlab-ci.yml | ||
gvc-channel-map-private.h | ||
gvc-channel-map.c | ||
gvc-channel-map.h | ||
gvc-mixer-card-private.h | ||
gvc-mixer-card.c | ||
gvc-mixer-card.h | ||
gvc-mixer-control-private.h | ||
gvc-mixer-control.c | ||
gvc-mixer-control.h | ||
gvc-mixer-event-role.c | ||
gvc-mixer-event-role.h | ||
gvc-mixer-sink-input.c | ||
gvc-mixer-sink-input.h | ||
gvc-mixer-sink.c | ||
gvc-mixer-sink.h | ||
gvc-mixer-source-output.c | ||
gvc-mixer-source-output.h | ||
gvc-mixer-source.c | ||
gvc-mixer-source.h | ||
gvc-mixer-stream-private.h | ||
gvc-mixer-stream.c | ||
gvc-mixer-stream.h | ||
gvc-mixer-ui-device.c | ||
gvc-mixer-ui-device.h | ||
gvc-pulseaudio-fake.h | ||
libgnome-volume-control.doap | ||
meson_options.txt | ||
meson.build | ||
README.md | ||
test-audio-device-selection.c |
libgnome-volume-control
libgnome-volume-control is a copy library that's supposed to be used as a git sub-module. If your project uses some of libgnome-volume-control's strings in a user-facing manner, don't forget to add those files to your POTFILES.in for translation.