Blame SOURCES/alsa-utils-1.0.28-duration.patch
|
|
55d01a |
From 8f361d83cfcb39887f5fc591633e68d9448e3425 Mon Sep 17 00:00:00 2001
|
|
|
55d01a |
From: Jaroslav Kysela <perex@perex.cz>
|
|
|
55d01a |
Date: Wed, 1 Oct 2014 15:43:57 +0200
|
|
|
55d01a |
Subject: [PATCH] Revert "aplay: fix pcm_read() return value"
|
|
|
55d01a |
|
|
|
55d01a |
This reverts commit 8aa13eec80eac312e4b99423909387660fb99b8f.
|
|
|
55d01a |
|
|
|
55d01a |
The semantics for pcm_read() and pcm_readv() was changed, but the
|
|
|
55d01a |
callers expect the exact frame count as requested. It's possible
|
|
|
55d01a |
to fix callers, but the fix is more complicated than to revert the
|
|
|
55d01a |
change. Note that '-d' processing was broken in some cases.
|
|
|
55d01a |
|
|
|
55d01a |
Note: The reverted commit allows that the return value might be
|
|
|
55d01a |
greater than requested (see the first condition in read routines).
|
|
|
55d01a |
---
|
|
|
55d01a |
aplay/aplay.c | 4 ++--
|
|
|
55d01a |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
55d01a |
|
|
|
55d01a |
diff --git a/aplay/aplay.c b/aplay/aplay.c
|
|
|
55d01a |
index 30d3f31..e58e1bc 100644
|
|
|
55d01a |
--- a/aplay/aplay.c
|
|
|
55d01a |
+++ b/aplay/aplay.c
|
|
|
55d01a |
@@ -2039,7 +2039,7 @@ static ssize_t pcm_read(u_char *data, size_t rcount)
|
|
|
55d01a |
data += r * bits_per_frame / 8;
|
|
|
55d01a |
}
|
|
|
55d01a |
}
|
|
|
55d01a |
- return result;
|
|
|
55d01a |
+ return rcount;
|
|
|
55d01a |
}
|
|
|
55d01a |
|
|
|
55d01a |
static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount)
|
|
|
55d01a |
@@ -2084,7 +2084,7 @@ static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount)
|
|
|
55d01a |
count -= r;
|
|
|
55d01a |
}
|
|
|
55d01a |
}
|
|
|
55d01a |
- return result;
|
|
|
55d01a |
+ return rcount;
|
|
|
55d01a |
}
|
|
|
55d01a |
|
|
|
55d01a |
/*
|
|
|
55d01a |
--
|
|
|
55d01a |
1.9.3
|
|
|
55d01a |
|