Skip to content

Commit

Permalink
SoundSource.cpp: return AVERROR_EOF when buffer is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Lihis authored and tsjost committed Jan 5, 2025
1 parent f10a5a8 commit e20356b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rwengine/src/audio/SoundSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int read_packet(void* opaque, uint8_t* buf, int buf_size) {
memcpy(buf, input->ptr, buf_size);
input->ptr += buf_size;
input->size -= buf_size;
return buf_size;
return buf_size <= 0 ? AVERROR_EOF : buf_size;
}
} // namespace

Expand Down

0 comments on commit e20356b

Please sign in to comment.