Displaying 1 result from an estimated 1 matches for "tentative_read".
2008 Feb 08
2
Quick bug in speexenc
...in function read_samples, size can get to negative
values, as long as fread is able to go forward with reading the file. This
can happen with Protools-generated wavs, where they put additional
information after the "data" fourcc.
I created a very quick hack by adding:
int tentative_read = bits/8*channels* frame_size;
if (*size < 0) {
tentative_read = tentative_read + *size; /* Size is
negative, don't forget ;) */
}
nb_read = fread(in,1,tentative_read, fin);
instead of the original fread.
This is a very dirty hack, but it...