mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:15:43 +01:00
aplay/arecord: Add more in_aborting checks to read/write loops
Reported-by: Sergey <sergemp@mail.ru> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
3775524880
commit
c06dbf0774
1 changed files with 4 additions and 4 deletions
|
@ -1921,7 +1921,7 @@ static ssize_t pcm_write(u_char *data, size_t count)
|
||||||
count = chunk_size;
|
count = chunk_size;
|
||||||
}
|
}
|
||||||
data = remap_data(data, count);
|
data = remap_data(data, count);
|
||||||
while (count > 0) {
|
while (count > 0 && !in_aborting) {
|
||||||
if (test_position)
|
if (test_position)
|
||||||
do_test_position();
|
do_test_position();
|
||||||
check_stdin();
|
check_stdin();
|
||||||
|
@ -1964,7 +1964,7 @@ static ssize_t pcm_writev(u_char **data, unsigned int channels, size_t count)
|
||||||
count = chunk_size;
|
count = chunk_size;
|
||||||
}
|
}
|
||||||
data = remap_datav(data, count);
|
data = remap_datav(data, count);
|
||||||
while (count > 0) {
|
while (count > 0 && !in_aborting) {
|
||||||
unsigned int channel;
|
unsigned int channel;
|
||||||
void *bufs[channels];
|
void *bufs[channels];
|
||||||
size_t offset = result;
|
size_t offset = result;
|
||||||
|
@ -2013,7 +2013,7 @@ static ssize_t pcm_read(u_char *data, size_t rcount)
|
||||||
count = chunk_size;
|
count = chunk_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (count > 0) {
|
while (count > 0 && !in_aborting) {
|
||||||
if (test_position)
|
if (test_position)
|
||||||
do_test_position();
|
do_test_position();
|
||||||
check_stdin();
|
check_stdin();
|
||||||
|
@ -2052,7 +2052,7 @@ static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount)
|
||||||
count = chunk_size;
|
count = chunk_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (count > 0) {
|
while (count > 0 && !in_aborting) {
|
||||||
unsigned int channel;
|
unsigned int channel;
|
||||||
void *bufs[channels];
|
void *bufs[channels];
|
||||||
size_t offset = result;
|
size_t offset = result;
|
||||||
|
|
Loading…
Reference in a new issue