mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
From 61642a5c08f38b32d2eef819b82f6adc24466932 Mon Sep 17 00:00:00 2001
|
|
From: Maarten Lankhorst <m.b.lankhorst@gmail.com>
|
|
Date: Sat, 4 Jan 2014 07:08:54 +0100
|
|
Subject: [PATCH 17/42] winepulse v12
|
|
|
|
Changes since v11:
|
|
- Fix incorrect assertions which may fail on moving a capture device
|
|
- Whitespace apply fixes
|
|
|
|
Changes since v10:
|
|
- Make some members static
|
|
- Fix small memory leak in GetService
|
|
---
|
|
dlls/winepulse.drv/mmdevdrv.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
|
index 5a71a3d..960af3c 100644
|
|
--- a/dlls/winepulse.drv/mmdevdrv.c
|
|
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
|
@@ -596,10 +596,11 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
|
|
dst = p->data;
|
|
while (rem) {
|
|
pa_stream_peek(This->stream, (const void**)&src, &src_len);
|
|
- assert(src_len && src_len <= bytes);
|
|
+ assert(src_len);
|
|
assert(This->peek_ofs < src_len);
|
|
src += This->peek_ofs;
|
|
src_len -= This->peek_ofs;
|
|
+ assert(src_len <= bytes);
|
|
|
|
copy = rem;
|
|
if (copy > src_len)
|
|
@@ -627,9 +628,10 @@ static void pulse_rd_drop(ACImpl *This, size_t bytes)
|
|
while (rem) {
|
|
const void *src;
|
|
pa_stream_peek(This->stream, &src, &src_len);
|
|
- assert(src_len && src_len <= bytes);
|
|
+ assert(src_len);
|
|
assert(This->peek_ofs < src_len);
|
|
src_len -= This->peek_ofs;
|
|
+ assert(src_len <= bytes);
|
|
|
|
copy = rem;
|
|
if (copy > src_len)
|
|
--
|
|
1.8.5.2
|
|
|