aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorVolker RĂ¼melin <vr_qemu@t-online.de>2020-01-23 08:49:40 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-01-31 08:48:03 +0100
commit3e0c1bbab52d124231f56bdaa99b6d0e4a6e3fa6 (patch)
tree5bcd8314442f5336c31167f72640c915f88ea4d2 /audio
parentfdc8c5f4717f42f4b19b733ada30da2ba92a3ad1 (diff)
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>
Diffstat (limited to 'audio')
-rw-r--r--audio/ossaudio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 576b5b5b20..39a6fc09e5 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -592,7 +592,7 @@ static void oss_enable_out(HWVoiceOut *hw, bool enable)
return;
}
- audio_pcm_info_clear_buf(&hw->info, hw->buf_emul, hw->mix_buf->size);
+ audio_pcm_info_clear_buf(&hw->info, hw->buf_emul, hw->samples);
trig = PCM_ENABLE_OUTPUT;
if (ioctl(oss->fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) {
oss_logerr(errno,