Fix for not decoding a too small SBC frame
Hello,
is it for any good that SBC tries to decode a frame even if it is too small or missing?
Attached you find a patch.
Greetings
Christian
--------------------------------------------------------
Dr.-Ing. Christian Hoene
Computer Networks and Internet, University of Tübingen Sand 13, 72076 Tübingen, Germany, Phone +49 7071 2970532
http://net.informatik.uni-tuebingen.de/~hoene
sbc/sbc.c +3 -0
@@ -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;