PIC32 port question

Erik Friesen <[email protected]> Fri, 25 Aug 2017 14:56:33 -0400
Newsgroups gmane.comp.audio.mp3.lame
Message-ID <CAEuupitXJJ6EWEY+-WzRUtonNg5eJ9X5VxuPW2snVnwNXM9rOw@mail.gmail.com>
I am attempting to port the Lame Encoder to the pic32 mips.  It may
have nothing to do with the port, but I find an exception in
putbits_noheaders

Putting this helper inside

putbits_noheaders(lame_internal_flags * gfc, int val, int j)
{
    Bit_stream_struc *bs;
    bs = &gfc->bs;

    assert(j < MAX_LENGTH - 2);

    while (j > 0) {
        int     k;
        if (bs->buf_bit_idx == 0) {
            bs->buf_bit_idx = 8;
   bs->buf_byte_idx++;
   assert(bs->buf_byte_idx < BUFFER_SIZE);
/**MyHelper**/
   PrintUart("bs->buf=%X[bs->buf_byte_idx=%i]\r\n", (int) bs->buf,
bs->buf_byte_idx);
   while (UartTxInProgress());
/**End**/
   bs->buf[bs->buf_byte_idx] = 0;
}

I get "bs->buf=0[bs->buf_byte_idx=0]"

So can someone tell me where buf gets malloced?

I have previously called it similar to:
lame_t gf;
gf = lame_init();
FlushMp3Buffer(gf);
SetParams(gf);
and it dies in lame_init_params(gf);

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot