Ignore:
Timestamp:
Feb 12, 2018 6:18:22 AM (3 years ago)
Author:
ming
Message:

Fixed #2089: Support receiving Opus packets with various frame lengths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/jbuf.c

    r4728 r5734  
    586586 
    587587 
     588PJ_DEF(pj_status_t) pjmedia_jbuf_set_ptime( pjmedia_jbuf *jb, 
     589                                            unsigned ptime) 
     590{ 
     591    PJ_ASSERT_RETURN(jb, PJ_EINVAL); 
     592 
     593    jb->jb_frame_ptime    = ptime; 
     594    jb->jb_min_shrink_gap = PJMEDIA_JBUF_DISC_MIN_GAP / ptime; 
     595    jb->jb_max_burst      = PJ_MAX(MAX_BURST_MSEC / ptime, 
     596                                   jb->jb_max_count*3/4); 
     597 
     598    return PJ_SUCCESS; 
     599} 
     600 
     601 
    588602/* 
    589603 * Set the jitter buffer to fixed delay mode. The default behavior 
Note: See TracChangeset for help on using the changeset viewer.