[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/12] audio/oss: fix buffer pos calculation
From: |
Gerd Hoffmann |
Subject: |
[PULL 01/12] audio/oss: fix buffer pos calculation |
Date: |
Fri, 7 Feb 2020 08:45:46 +0100 |
Fixes: 3ba4066d085f ("ossaudio: port to the new audio backend api")
Reported-by: ziming zhang <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
audio/ossaudio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index c43faeeea4aa..94564916fbf0 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;
}
--
2.18.1
- [PULL 00/12] Audio 20200207 patches, Gerd Hoffmann, 2020/02/07
- [PULL 02/12] audio: fix audio_generic_write, Gerd Hoffmann, 2020/02/07
- [PULL 04/12] paaudio: remove unused variables, Gerd Hoffmann, 2020/02/07
- [PULL 01/12] audio/oss: fix buffer pos calculation,
Gerd Hoffmann <=
- [PULL 05/12] audio: prevent SIGSEGV in AUD_get_buffer_size_out, Gerd Hoffmann, 2020/02/07
- [PULL 03/12] audio: fix audio_generic_read, Gerd Hoffmann, 2020/02/07
- [PULL 07/12] ossaudio: prevent SIGSEGV in oss_enable_out, Gerd Hoffmann, 2020/02/07
- [PULL 08/12] ossaudio: disable poll mode can't be reached, Gerd Hoffmann, 2020/02/07
- [PULL 11/12] coreaudio: fix coreaudio playback, Gerd Hoffmann, 2020/02/07
- [PULL 09/12] audio: audio_generic_get_buffer_in should honor *size, Gerd Hoffmann, 2020/02/07
- [PULL 06/12] audio: fix bug 1858488, Gerd Hoffmann, 2020/02/07
- [PULL 12/12] audio: proper support for float samples in mixeng, Gerd Hoffmann, 2020/02/07
- [PULL 10/12] audio/dsound: fix invalid parameters error, Gerd Hoffmann, 2020/02/07