[Speex-dev] bitpack error message

Greg caroundw5h at yahoo.com
Fri Jul 6 12:22:09 PDT 2007


found the error. 

it was simply that i didn't init the bits structures. plain and simple.
thus it caused it to seg fault and crash. a nice cleanup and exiting function 
would be nice. the code caused a core dump and a "BSOD" 
on windows. mine was really green though since i have a gateway 
and it crashes with any color in the spectrum. ;)

thanks for trying though.
greg

Greg <caroundw5h at yahoo.com> wrote: i don't think so. this is my current code:
 
    for(i=0; i<samples;i++){
   /*only get max 320 bytes at a time so bits can handle*/
       Client->raw_audio[i] = *input++;  
       Client->temp_audio[i] = Client->raw_audio[i];
       Client->session_File[ndx] = Client->temp_audio[i];
       ndx+=1;
       } 
     speex_bits_reset(&ebits);
    
    speex_encode_int(enc_state,Client->temp_audio,&ebits);

    Client->nBytes = speex_bits_write(&ebits,Client->encoded_audio, samples);

    speex_bits_read_from(&dbits,Client->encoded_audio,Client->nBytes);

    /*decode from dbits to  raw_audio*/
    speex_decode_int(dec_state,&dbits,Client->raw_audio);


i did move the reset function to before the for loop to test. but it still crashed.

Jean-Marc Valin <jean-marc.valin at usherbrooke.ca> wrote: Are you encoding frames one after the other without reseting the
bit-packer by any chance?

 Jean-Marc

Greg a écrit :
> Hi,
> i have some code that gives me a "warning: Buffer too small to pack bits"
> mesage. looking at the libspeex source/bits.c i see the warning in a 
> a function named speex_bits_pack. i'm not using this function.
> 
> can someone tell me where this may be coming from since i've had a 
> similiar problem before and had that fixed. i can't seem to pinpoint this
> one.
> 
> thanks
> Greg
>  
>  
> ---------------------------------
> It's here! Your new message!
> Get new email alerts with the free Yahoo! Toolbar.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
_______________________________________________
Speex-dev mailing list
Speex-dev at xiph.org
http://lists.xiph.org/mailman/listinfo/speex-dev

        

---------------------------------
Shape Yahoo! in your own image.   Join our Network Research Panel today! _______________________________________________
Speex-dev mailing list
Speex-dev at xiph.org
http://lists.xiph.org/mailman/listinfo/speex-dev


       
---------------------------------
Pinpoint customers who are looking for what you sell. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070706/56792be3/attachment.html


More information about the Speex-dev mailing list