ossaudio: prevent SIGSEGV in oss_enable_out
commit3e0c1bbab52d124231f56bdaa99b6d0e4a6e3fa6
authorVolker Rümelin <vr_qemu@t-online.de>
Thu, 23 Jan 2020 07:49:40 +0000 (23 08:49 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 31 Jan 2020 07:48:03 +0000 (31 08:48 +0100)
tree5bcd8314442f5336c31167f72640c915f88ea4d2
parentfdc8c5f4717f42f4b19b733ada30da2ba92a3ad1
ossaudio: prevent SIGSEGV in oss_enable_out

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

To reproduce the problem start qemu with
-audiodev oss,id=audio0,try-mmap=on,out.mixing-engine=off

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