summaryrefslogtreecommitdiff
path: root/main/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/frame.c')
-rw-r--r--main/frame.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/frame.c b/main/frame.c
index af782edc2..a4a7f2d32 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -1406,7 +1406,9 @@ static int speex_samples(unsigned char *data, int len)
}
bit += off;
- if ((len * 8 - bit) < 5) {
+ if ((len * 8 - bit) == 0) {
+ break;
+ } else if ((len * 8 - bit) < 5) {
ast_log(LOG_WARNING, "Not enough bits remaining after wide band for speex samples.\n");
break;
}