mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
audio: add sanity check
Check whenever we actually found the spiceaudio driver
before flipping the can_be_default field.
Fixes: f0c4555edf
("audio: remove qemu_spice_audio_init()")
Buglink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977301
Reported-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20201215081151.20095-1-kraxel@redhat.com>
This commit is contained in:
parent
ab32b78cd1
commit
06c8c37538
|
@ -1684,8 +1684,10 @@ static AudioState *audio_init(Audiodev *dev, const char *name)
|
|||
* backend and this can go away.
|
||||
*/
|
||||
driver = audio_driver_lookup("spice");
|
||||
if (driver) {
|
||||
driver->can_be_default = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (dev) {
|
||||
/* -audiodev option */
|
||||
|
|
Loading…
Reference in a new issue