1 From ad7be040894661b708f9c861696499640ac7f9dc Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Tomi=20L=C3=A4hteenm=C3=A4ki?= <lihis@lihis.net>
3 Date: Fri, 1 Dec 2023 16:01:59 +0200
4 Subject: [PATCH] SoundSource.cpp: return AVERROR_EOF when buffer is empty
7 rwengine/src/audio/SoundSource.cpp | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
10 diff --git a/rwengine/src/audio/SoundSource.cpp b/rwengine/src/audio/SoundSource.cpp
11 index c93376e73..d355cab74 100644
12 --- a/rwengine/src/audio/SoundSource.cpp
13 +++ b/rwengine/src/audio/SoundSource.cpp
14 @@ -55,7 +55,7 @@ int read_packet(void* opaque, uint8_t* buf, int buf_size) {
15 memcpy(buf, input->ptr, buf_size);
16 input->ptr += buf_size;
17 input->size -= buf_size;
19 + return buf_size <= 0 ? AVERROR_EOF : buf_size;