Changeset 1983 for pjproject/trunk/pjmedia/src/pjmedia-codec/g722.c
- Timestamp:
- Jun 5, 2008 10:50:40 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/g722.c
r1977 r1983 533 533 pj_status_t status; 534 534 535 pj_assert(g722_data != NULL); 536 PJ_ASSERT_RETURN(input && output, PJ_EINVAL); 537 538 if (output_buf_len < FRAME_LEN) 539 return PJMEDIA_CODEC_EFRMTOOSHORT; 540 541 PJ_ASSERT_RETURN(input->size/2 == SAMPLES_PER_FRAME, 542 PJMEDIA_CODEC_EPCMFRMINLEN); 535 pj_assert(g722_data && input && output); 536 537 PJ_ASSERT_RETURN((input->size >> 2) <= output_buf_len, 538 PJMEDIA_CODEC_EFRMTOOSHORT); 543 539 544 540 /* Detect silence */ … … 571 567 output->size = output_buf_len; 572 568 status = g722_enc_encode(&g722_data->encoder, (pj_int16_t*)input->buf, 573 SAMPLES_PER_FRAME, output->buf, &output->size);569 (input->size >> 1), output->buf, &output->size); 574 570 if (status != PJ_SUCCESS) { 575 571 output->size = 0;
Note: See TracChangeset
for help on using the changeset viewer.