diff options
author | Rob Sykes <rob@rob-Ideapad-S205.(none)> | 2012-12-11 01:26:18 +0400 |
---|---|---|
committer | Rob Sykes <rob@rob-Ideapad-S205.(none)> | 2012-12-11 01:26:18 +0400 |
commit | 9e8a437e6cb1c0e12f99f7ccf52d3d505ce88d95 (patch) | |
tree | 794025c6e295ec19449813892ed72ed4cbb12815 | |
parent | 488304c516515a36d358cddfa13a6126ee7e3736 (diff) |
robustness against double flush (merged from libsox)
-rw-r--r-- | src/rate.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -632,7 +632,7 @@ static void rate_flush(rate_t * p) size_t remaining = (size_t)(samples_out - p->samples_out); sample_t * buff = calloc(1024, sizeof(*buff)); - if ((int)remaining > 0) { + if (samples_out > p->samples_out) { while ((size_t)fifo_occupancy(fifo) < remaining) { rate_input(p, buff, 1024); rate_process(p); |