summaryrefslogtreecommitdiffstats
path: root/sbc
diff options
context:
space:
mode:
authorBrad Midgley <bmidgley@xmission.com>2007-12-14 00:15:33 +0000
committerBrad Midgley <bmidgley@xmission.com>2007-12-14 00:15:33 +0000
commit356a8b48cde75a93680350454c293dc8913f4104 (patch)
treeeba1281932d0b14253eab8f1ea69e8b89c445343 /sbc
parentc5e43eefcc34641b875f2565c1c4b5b4616d3f58 (diff)
be more strict about calculating from joint since client may set it to
a funky value other than 0/1
Diffstat (limited to 'sbc')
-rw-r--r--sbc/sbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbc/sbc.c b/sbc/sbc.c
index 86efadcf..960a5bc5 100644
--- a/sbc/sbc.c
+++ b/sbc/sbc.c
@@ -1366,7 +1366,7 @@ int sbc_get_frame_length(sbc_t *sbc)
if (sbc->channels == 1)
ret += ((sbc->blocks * sbc->channels * sbc->bitpool) + 7) / 8;
else
- ret += ((sbc->joint * sbc->subbands + sbc->blocks * sbc->bitpool)
+ ret += (((sbc->joint? sbc->subbands:0) + sbc->blocks * sbc->bitpool)
+ 7) / 8;
return ret;