Commit c336a88f authored by jm's avatar jm
Browse files

We should never have set all bits to zero when resizing. It's now actually

useless to set anything to zero.

git-svn-id: 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 4ab84b70
......@@ -76,6 +76,7 @@ void speex_bits_destroy(SpeexBits *bits)
void speex_bits_reset(SpeexBits *bits)
/* We only need to clear the first byte now */
......@@ -225,11 +226,10 @@ void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
speex_warning("Buffer too small to pack bits");
if (bits->owner)
int new_nchars = ((bits->buf_size+5)*3)>>1;
int new_nchars = ((bits->buf_size+5)*3)>>1;
char *tmp = (char*)speex_realloc(bits->chars, new_nchars);
if (tmp)
speex_memset_bytes(tmp, 0, new_nchars);
} else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment