src/qemu/qemu_domain.c: Fix overriding audioBackend in qemuDomainDefSuggestDefaultAudioBackend

If we have Spice and VNC graphics in domain XML, and Spice graphics defined before VNC, audioBackend will be overrided in qemuDomainDefSuggestDefaultAudioBackend to VIR_DOMAIN_AUDIO_TYPE_NONE, and we will have no sound in Spice session, like this https://bugs.launchpad.net/qemu/+bug/1900352. If the flag addAudio already set, we do not need to override audioBackend. This commit fix the issue.
This commit is contained in:
Anton Fadeev 2023-06-28 15:14:08 +03:00 committed by antonios-f
parent d7fb8deb6a
commit 971753af89

View File

@ -3920,7 +3920,9 @@ qemuDomainDefSuggestDefaultAudioBackend(virQEMUDriver *driver,
audioPassthrough = true;
} else {
audioPassthrough = false;
*audioBackend = VIR_DOMAIN_AUDIO_TYPE_NONE;
if (!*addAudio) {
*audioBackend = VIR_DOMAIN_AUDIO_TYPE_NONE;
}
}
*addAudio = true;
break;