Changeset 2672


Ignore:
Timestamp:
May 1, 2009 3:13:01 PM (15 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.

Location:
pjproject/trunk/pjmedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/build/Jbtest.dat

    r2579 r2672  
    185185!burst      1 
    186186!discard    0 
    187 !lost       3 
    188 !empty      1 
     187!lost       7 
     188!empty      3 
    189189!delay      3 
    190190PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG 
     
    193193# Normal 
    194194PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG 
     195# More losts 
     196PLPGGGPPPGGGPLPGGGPG PLPGGGPPPGGGPLPGGGPG 
     197# Normal 
     198PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG 
    195199. 
    196200 
  • 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.