Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alexmarsev/soxr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Sykes <rob@rob-Ideapad-S205.(none)>2012-12-11 01:26:18 +0400
committerRob Sykes <rob@rob-Ideapad-S205.(none)>2012-12-11 01:26:18 +0400
commit9e8a437e6cb1c0e12f99f7ccf52d3d505ce88d95 (patch)
tree794025c6e295ec19449813892ed72ed4cbb12815
parent488304c516515a36d358cddfa13a6126ee7e3736 (diff)
robustness against double flush (merged from libsox)
-rw-r--r--src/rate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rate.h b/src/rate.h
index 4110b2b..6ce2263 100644
--- a/src/rate.h
+++ b/src/rate.h
@@ -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);