Changeset 1777
- Timestamp:
- Feb 4, 2008 11:37:01 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/jbuf2/pjmedia/src/pjmedia-codec/speex_codec.c
r1677 r1777 769 769 struct pjmedia_frame *output) 770 770 { 771 struct spx_private *spx; 772 773 spx = (struct spx_private*) codec->codec_data; 774 775 PJ_ASSERT_RETURN(output_buf_len >= 320, PJMEDIA_CODEC_EPCMTOOSHORT); 771 struct spx_private *spx = (struct spx_private*) codec->codec_data; 772 unsigned pcm_size; 773 774 pcm_size = spx_factory.speex_param[spx->param_id].samples_per_frame << 1; 775 776 PJ_ASSERT_RETURN(output_buf_len >= pcm_size, PJMEDIA_CODEC_EPCMTOOSHORT); 776 777 777 778 if (input->type != PJMEDIA_FRAME_TYPE_AUDIO) { 778 pjmedia_zero_samples((pj_int16_t*)output->buf, 160); 779 output->size = 320; 779 output->size = pcm_size; 780 780 output->timestamp.u64 = input->timestamp.u64; 781 781 output->type = PJMEDIA_FRAME_TYPE_AUDIO; 782 pj_bzero(output->buf, output->size); 782 783 return PJ_SUCCESS; 783 784 } … … 790 791 791 792 output->type = PJMEDIA_FRAME_TYPE_AUDIO; 792 output->size = 320;793 output->size = pcm_size; 793 794 output->timestamp.u64 = input->timestamp.u64; 794 795
Note: See TracChangeset
for help on using the changeset viewer.