aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-23 23:41:38 +0100
committerMarcel Holtmann <marcel@holtmann.org>2012-07-29 19:48:27 -0700
commit84825753b729c9da2d9dc20c136c8c99c65e7497 (patch)
tree2b96ffe48be9c5dbcf9115e620b0c212290de3b6
parent66d35388cc48872f32290b25a5da83d8f0ba3562 (diff)
sbc: Don't decode a frame if it is too small
-rw-r--r--sbc/sbc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbc/sbc.c b/sbc/sbc.c
index 5411893..a3a3ac1 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;