diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-23 23:41:38 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-07-29 19:48:27 -0700 |
commit | 84825753b729c9da2d9dc20c136c8c99c65e7497 (patch) | |
tree | 2b96ffe48be9c5dbcf9115e620b0c212290de3b6 | |
parent | 66d35388cc48872f32290b25a5da83d8f0ba3562 (diff) |
sbc: Don't decode a frame if it is too small
-rw-r--r-- | sbc/sbc.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |