Ignore:
Timestamp:
Jun 5, 2008 10:50:40 AM (16 years ago)
Author:
nanang
Message:

Ticket #473:

  • fixed issue on Speex multiple frames (encoding: encoded bits concatenation & decoding: frames parsing)
  • updated pjmedia stream & codecs on encoding multiple frames
  • introduced bit_info in pjmedia_frame and jitter buffer
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/g722.c

    r1977 r1983  
    533533    pj_status_t status; 
    534534 
    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); 
    543539 
    544540    /* Detect silence */ 
     
    571567    output->size = output_buf_len; 
    572568    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); 
    574570    if (status != PJ_SUCCESS) { 
    575571        output->size = 0; 
Note: See TracChangeset for help on using the changeset viewer.