I don't know anything about how the encoder works, but I built lame
with egcs-1.1.2+bounds-checking, and when I try to encode a 22khz file
(at any bitrate), I get the following:

Found WAV header:  22.1kHz stereo
LAME version 3.17 (www.sulaco.org/mp3)
Encoding ../../me22.wav to me22.mp3
Encoding as 22.1 kHz 80 kbps j-stereo MPEG2 LayerIII file
using GPSYCHO: GPL'd psycho-acoustic model
    Frame          |  CPU/estimated  |  time/estimated | play/CPU | ETA
l3psy.c:1151:Bounds error: 
  attempt to reference memory overrunning the end of an object.
l3psy.c:1151:  Pointer value: 0x8102090
l3psy.c:1151:  Object `qthr_s.41':
l3psy.c:1151:    Address in memory:    0x8101f40 .. 0x810208f
l3psy.c:1151:    Size:                 336 bytes
l3psy.c:1151:    Element size:         1 bytes
l3psy.c:1151:    Number of elements:   336
l3psy.c:1151:    Storage class:        static

Program received signal SIGABRT, Aborted.
0x2814c8d4 in kill () from /usr/lib/libc.so.3
(gdb) l
1146              cbmax = cbmax_tp;
1147              for(i=0,k2=0;i<cbmax_tp;i++)
1148                {
1149                  j = (int) *p++;
1150                  numlines[i] = (int) *p++;
1151                  qthr_s[i] = *p++;
1152                  norm_s[i] = *p++;
(gdb) p i
$1 = 42
(gdb) p cbmax_tp
$2 = 45
(gdb) 

Trouble is, qthr_s[] is only CBANDS_s == 42 elements long.  What
happens to the last three iterations in this loop?  Are they supposed
to run off the end of the array, or should some adjustment be made
because of MPEG2?

If it's any consolation, plain MPEG1 encoding on a 44khz file runs
without flagging any bounds errors :)

        -Dan Nelson
        [EMAIL PROTECTED]
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to