405ca57e69
- Include upstream patches targeted for the next stable release (bug fixes only) audio-oss-fix-buffer-pos-calculation.patch blkdebug-Allow-taking-unsharing-permissi.patch block-Add-bdrv_qapi_perm_to_blk_perm.patch block-backup-top-fix-failure-path.patch block-block-copy-fix-progress-calculatio.patch block-fix-crash-on-zero-length-unaligned.patch block-fix-memleaks-in-bdrv_refresh_filen.patch block-Fix-VM-size-field-width-in-snapsho.patch block-nbd-extract-the-common-cleanup-cod.patch block-nbd-fix-memory-leak-in-nbd_open.patch block-qcow2-threads-fix-qcow2_decompress.patch hw-arm-cubieboard-use-ARM-Cortex-A8-as-t.patch hw-intc-arm_gicv3_kvm-Stop-wrongly-progr.patch iotests-add-test-for-backup-top-failure-.patch iotests-Fix-nonportable-use-of-od-endian.patch job-refactor-progress-to-separate-object.patch target-arm-Correct-definition-of-PMCRDP.patch target-arm-fix-TCG-leak-for-fcvt-half-do.patch tpm-ppi-page-align-PPI-RAM.patch vhost-user-blk-delete-virtioqueues-in-un.patch virtio-add-ability-to-delete-vq-through-.patch virtio-crypto-do-delete-ctrl_vq-in-virti.patch virtio-pmem-do-delete-rq_vq-in-virtio_pm.patch - Add Obsoletes directive for qemu-audio-sdl and qemu-ui-sdl since for a qemu package upgrade from SLE12-SP5, support for SDL is dropped OBS-URL: https://build.opensuse.org/request/show/784401 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=534
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
Date: Mon, 20 Jan 2020 11:18:04 +0100
|
|
Subject: audio/oss: fix buffer pos calculation
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Git-commit: 7a4ede0047a8613b0e3b72c9d351038f013dd357
|
|
|
|
Fixes: 3ba4066d085f ("ossaudio: port to the new audio backend api")
|
|
Reported-by: ziming zhang <ezrakiez@gmail.com>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Message-Id: <20200120101804.29578-1-kraxel@redhat.com>
|
|
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
---
|
|
audio/ossaudio.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
|
|
index c43faeeea4aa208c9729cc760dcd..94564916fbf03c4783a5fdf5c403 100644
|
|
--- a/audio/ossaudio.c
|
|
+++ b/audio/ossaudio.c
|
|
@@ -420,7 +420,7 @@ static size_t oss_write(HWVoiceOut *hw, void *buf, size_t len)
|
|
size_t to_copy = MIN(len, hw->size_emul - hw->pos_emul);
|
|
memcpy(hw->buf_emul + hw->pos_emul, buf, to_copy);
|
|
|
|
- hw->pos_emul = (hw->pos_emul + to_copy) % hw->pos_emul;
|
|
+ hw->pos_emul = (hw->pos_emul + to_copy) % hw->size_emul;
|
|
buf += to_copy;
|
|
len -= to_copy;
|
|
}
|