Message ID | 1499211867-3126-1-git-send-email-peng.hao2@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/audio/rate_template.h b/audio/rate_template.h index bd4b1c7..1aa6c43 100644 --- a/audio/rate_template.h +++ b/audio/rate_template.h @@ -71,6 +71,11 @@ void NAME (void *opaque, struct st_sample *ibuf, struct st_sample *obuf, while (rate->ipos <= (rate->opos >> 32)) { ilast = *ibuf++; rate->ipos++; + /* if ipos reversal, there is a dead loop */ + if (rate->ipos == 0xffffffff) { + rate->ipos = 1; + rate->opos = rate->opos & 0xffffffff; + } /* See if we finished the input buffer yet */ if (ibuf >= iend) { goto the_end;