summaryrefslogtreecommitdiffstats
path: root/sbc
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-23 23:41:38 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-23 23:41:38 +0100
commitce633965e14cb8ad8a55cdfc3ebbcb3b7e4ccb22 (patch)
tree4261be40b44e8f26905736c5bb2025c62605dbbd /sbc
parentc004bc8c66d7c1397c732295e5c2f3fa12f5bb2c (diff)
Don't decode a frame if it is too small
Diffstat (limited to 'sbc')
-rw-r--r--sbc/sbc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbc/sbc.c b/sbc/sbc.c
index 54118934..a3a3ac10 100644
--- a/sbc/sbc.c
+++ b/sbc/sbc.c
@@ -1196,6 +1196,9 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
if (written)
*written = 0;
+ if (framelen <= 0)
+ return framelen;
+
samples = sbc_synthesize_audio(&priv->dec_state, &priv->frame);
ptr = output;