]> git.proxmox.com Git - mirror_qemu.git/commitdiff
audio: fix audio_generic_write
authorVolker Rümelin <vr_qemu@t-online.de>
Thu, 23 Jan 2020 07:49:35 +0000 (08:49 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 31 Jan 2020 07:48:03 +0000 (08:48 +0100)
The pcm_ops function put_buffer_out expects the returned pointer
of function get_buffer_out as argument. Fix this.

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

index f63f39769a9ff240ec032edf893d0fb5e152dab1..7226aa64ff93341ebdedea00beffe92c248d4b11 100644 (file)
@@ -1476,7 +1476,7 @@ size_t audio_generic_write(HWVoiceOut *hw, void *buf, size_t size)
     copy_size = MIN(size, dst_size);
 
     memcpy(dst, buf, copy_size);
-    return hw->pcm_ops->put_buffer_out(hw, buf, copy_size);
+    return hw->pcm_ops->put_buffer_out(hw, dst, copy_size);
 }
 
 size_t audio_generic_read(HWVoiceIn *hw, void *buf, size_t size)