When encoding a particular 24kHz sampled PCM file I
found that the 'subsampling' function within 'psycho_I.c'
produced a seg fault.
It appears that if the "while (i != LAST ) ..." loop at the
top of the function only executes once in this function, a
seg fault occurs because i is set to -100 (value of the
constant 'STOP') in the loop. At the beginning of the
next iteration, the function tries to access index -100 of
the array 'power', which produces the fault.
This problem is solved by changing the code from:
while (i != LAST)
{
...
}
to:
while ( (i != LAST) && (i != STOP) )
{
...
}
for each of the three 'while' loops within
the 'subsampling' function, and also the 'threshold'
function of 'psycho_I.c'.
Ammended psycho_I.c. Changes next to /DJC/ comments
Ammended psycho_I.c. Changes next to /DJC/ comments
Logged In: YES
user_id=141181
There's a very hackish FIXLSF compile switch that was put in
for version02i that sort of covers this for some cases, but
not all. 02k will cover them all.