# HG changeset patch # User jbr # Date 1251421020 0 # Node ID ebe5812b39a758ced46f7dd8932c59c6e50d8256 # Parent 4186efb8693372b502249ef49c071cd6d6bc3616 Use the output data type to determine the maximum number of samples that can be decoded. diff -r 4186efb86933 -r ebe5812b39a7 libspeexdec.c --- a/libspeexdec.c Fri Aug 28 00:44:54 2009 +0000 +++ b/libspeexdec.c Fri Aug 28 00:57:00 2009 +0000 @@ -101,7 +101,7 @@ int i, num_samples; num_samples = s->header->frame_size * avctx->channels; - end = output + *data_size/2; + end = output + *data_size / sizeof(*output); speex_bits_read_from(&s->bits, buf, buf_size);