mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-14 04:45:42 +01:00
Fixed count overflow problem
This commit is contained in:
parent
5524873f8d
commit
3fc76a4e6d
1 changed files with 2 additions and 0 deletions
|
@ -1756,6 +1756,8 @@ static void capture(char *name)
|
||||||
fdcount = 0;
|
fdcount = 0;
|
||||||
count = calc_count();
|
count = calc_count();
|
||||||
count += count % 2;
|
count += count % 2;
|
||||||
|
if (count == 0)
|
||||||
|
count -= 2;
|
||||||
/* WAVE-file should be even (I'm not sure), but wasting one byte
|
/* WAVE-file should be even (I'm not sure), but wasting one byte
|
||||||
isn't a problem (this can only be in 8 bit mono) */
|
isn't a problem (this can only be in 8 bit mono) */
|
||||||
if (fmt_rec_table[file_type].start)
|
if (fmt_rec_table[file_type].start)
|
||||||
|
|
Loading…
Reference in a new issue