[speex-dev] libspeex crash with RC3
Daniel Vogel
vogel at epicgames.com
Wed Mar 12 20:34:11 PST 2003
Narrowed it down a bit. For me the code crashes encoding the second frame if
the first encoded frame was all zeros. Can someone else reproduce this or am
I on crack and should look for a bug elsewhere?
// Initialize speex encoder.
SpeexEncoderBits = new SpeexBits;
SpeexEncoderState = speex_encoder_init(&speex_nb_mode);
INT FrameSize,
SamplingRate = 8000, // 8000 Hz
BitRate = 4000; // 4kbps == 10 bytes per 20 ms
peex_encoder_ctl( SpeexEncoderState, SPEEX_SET_BITRATE , &BitRate );
speex_encoder_ctl( SpeexEncoderState, SPEEX_SET_SAMPLING_RATE ,
&SamplingRate );
speex_encoder_ctl( SpeexEncoderState, SPEEX_GET_FRAME_SIZE , &FrameSize );
FLOAT Src[VOICE_FRAME_SIZE];
appMemzero( Src, sizeof(Src) );
char Dest[VOICE_FRAME_SIZE];
peex_bits_init( SpeexEncoderBits );
speex_bits_reset( SpeexEncoderBits );
speex_encode( SpeexEncoderState, Src, SpeexEncoderBits );
INT PacketSize = speex_bits_write( SpeexEncoderBits, Dest,
VOICE_FRAME_SIZE );
check( FrameSize == VOICE_FRAME_SIZE );
check( PacketSize == FVoicePacket::Size );
peex_bits_reset( SpeexEncoderBits );
speex_encode( SpeexEncoderState, Src, SpeexEncoderBits ); //<-- boom!!!
Thanks,
-- Daniel, Epic Games Inc.
> -----Original Message-----
> From: owner-speex-dev at xiph.org [mailto:owner-speex-dev at xiph.org]On
> Behalf Of Daniel Vogel
> Sent: Wednesday, March 12, 2003 10:40 PM
> To: speex-dev at xiph.org
> Subject: [speex-dev] libspeex crash with RC3
>
>
> I tried to compress 160 samples of random garbage (range 0-500.f) at 4kbps
> and got a crash in nb_encode -> forced_pitch_quant because start
> was -858993460 (== ol_pitch).
>
> -- Daniel, Epic Games Inc.
>
> --- >8 ----
> List archives: http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to
> 'speex-dev-request at xiph.org'
> containing only the word 'unsubscribe' in the body. No subject is needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
>
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Speex-dev
mailing list