audio: prevent SIGSEGV in AUD_get_buffer_size_out
commit69ac07863205ec281bcd2f2e6571202da0c315f7
authorVolker Rümelin <vr_qemu@t-online.de>
Thu, 23 Jan 2020 07:49:38 +0000 (23 08:49 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 31 Jan 2020 07:48:03 +0000 (31 08:48 +0100)
tree9dc45f16d9187eca497534a1baaaab89923f9fe8
parenta76e6b8794727ae777e33856e1ccd2b410d0bde2
audio: prevent SIGSEGV in AUD_get_buffer_size_out

With audiodev parameter out.mixing-engine=off hw->mix_buf is
NULL. This leads to a segmentation fault in
AUD_get_buffer_size_out. This patch reverts a small part of
dc88e38fa7 "audio: unify input and output mixeng buffer
management".

To reproduce the problem start qemu with
-soundhw adlib -audiodev pa,id=audio0,out.mixing-engine=off

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20200123074943.6699-4-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
audio/audio.c