Ignore:
Timestamp:
May 1, 2009 3:13:01 PM (10 years ago)
Author:
nanang
Message:

Ticket #762: Fixed jitter buffer in handling DTX with relative short period of 'keep alive', e.g: Speex DTX seems to periodically send a keep alive frame every 20 silence frames.

File:
1 edited

Legend:

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

    r2662 r2672  
    316316    assert(frame_size <= framelist->frame_size); 
    317317 
    318     /* the first ever frame since inited/resetted. */ 
    319     if (framelist->origin == INVALID_OFFSET) 
    320         framelist->origin = index; 
    321  
    322318    /* too late or duplicated or sequence restart */ 
    323319    if (index < framelist->origin) { 
     
    331327    } 
    332328 
     329    /* if jbuf is empty, just reset the origin */ 
     330    if (framelist->size == 0) { 
     331        framelist->origin = index; 
     332    } 
     333 
    333334    /* get distance of this frame to the first frame in the buffer */ 
    334335    distance = index - framelist->origin; 
     
    342343            distance = 0; 
    343344        } else { 
    344             if (framelist->size == 0) { 
    345                 /* if jbuf is empty, process the frame */ 
    346                 framelist->origin = index; 
    347                 distance = 0; 
    348             } else { 
    349                 /* otherwise, reject the frame */ 
    350                 return PJ_ETOOMANY; 
    351             } 
     345            /* otherwise, reject the frame */ 
     346            return PJ_ETOOMANY; 
    352347        } 
    353348    } 
Note: See TracChangeset for help on using the changeset viewer.