Changeset 1266 for pjproject/trunk/pjmedia/src/pjmedia-codec/speex_codec.c
- Timestamp:
- May 11, 2007 3:14:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/speex_codec.c
r974 r1266 482 482 pj_list_erase(codec); 483 483 } else { 484 codec = pj_pool_zalloc(spx_factory.pool, 485 sizeof(pjmedia_codec)); 484 codec = PJ_POOL_ZALLOC_T(spx_factory.pool, pjmedia_codec); 486 485 PJ_ASSERT_RETURN(codec != NULL, PJ_ENOMEM); 487 486 codec->op = &spx_op; … … 737 736 738 737 /* Encode the frame */ 739 tx = speex_encode_int(spx->enc, input->buf, &spx->enc_bits); 738 tx = speex_encode_int(spx->enc, (spx_int16_t*)input->buf, 739 &spx->enc_bits); 740 740 741 741 /* Check if we need not to transmit the frame (DTX) */ … … 754 754 /* Copy the bits to an array of char that can be written */ 755 755 output->size = speex_bits_write(&spx->enc_bits, 756 output->buf, output_buf_len);756 (char*)output->buf, output_buf_len); 757 757 output->type = PJMEDIA_FRAME_TYPE_AUDIO; 758 758 output->timestamp = input->timestamp; … … 782 782 783 783 /* Copy the data into the bit-stream struct */ 784 speex_bits_read_from(&spx->dec_bits, input->buf, input->size);784 speex_bits_read_from(&spx->dec_bits, (char*)input->buf, input->size); 785 785 786 786 /* Decode the data */ 787 speex_decode_int(spx->dec, &spx->dec_bits, output->buf);787 speex_decode_int(spx->dec, &spx->dec_bits, (spx_int16_t*)output->buf); 788 788 789 789 output->type = PJMEDIA_FRAME_TYPE_AUDIO; 790 790 output->size = speex_bits_nbytes(&spx->dec_bits); 791 pj_assert(output->size <= ( int)output_buf_len);791 pj_assert(output->size <= (unsigned)output_buf_len); 792 792 output->timestamp.u64 = input->timestamp.u64; 793 793 … … 815 815 816 816 /* Recover packet loss */ 817 speex_decode_int(spx->dec, NULL, output->buf);817 speex_decode_int(spx->dec, NULL, (spx_int16_t*) output->buf); 818 818 819 819 output->size = count * 2;
Note: See TracChangeset
for help on using the changeset viewer.