From: Giovanni Mascellani <gmascellani@codeweavers.com> This can happen if nSamplesPerSec is too small, and it leads to a crash. --- dlls/winepulse.drv/pulse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c index 7c8d872c604..8033f0f851b 100644 --- a/dlls/winepulse.drv/pulse.c +++ b/dlls/winepulse.drv/pulse.c @@ -1178,6 +1178,12 @@ static NTSTATUS pulse_create_stream(void *args) stream->ss.rate, 10000000); + if (stream->period_bytes == 0) + { + hr = E_INVALIDARG; + goto exit; + } + stream->bufsize_frames = ceil((params->duration / 10000000.) * params->fmt->nSamplesPerSec); bufsize_bytes = stream->bufsize_frames * pa_frame_size(&stream->ss); stream->mmdev_period_usec = params->period / 10; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9749