- Timestamp:
- Apr 7, 2009 11:16:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/jbuf.c
r2578 r2583 336 336 } 337 337 338 /* too soon or jump too far */338 /* get distance of this frame to the first frame in the buffer */ 339 339 distance = index - framelist->origin; 340 341 /* far jump, the distance is greater than buffer capacity */ 340 342 if (distance >= (int)framelist->max_count) { 341 343 if (distance > MAX_DROPOUT) { 342 /* jump too far */344 /* jump too far, reset the buffer */ 343 345 jb_framelist_reset(framelist); 344 346 framelist->origin = index; 345 347 distance = 0; 346 348 } else { 347 /* too soon, buffer is not enough */ 348 return PJ_ETOOMANY; 349 if (framelist->size == 0) { 350 /* if jbuf is empty, process the frame */ 351 framelist->origin = index; 352 distance = 0; 353 } else { 354 /* otherwise, reject the frame */ 355 return PJ_ETOOMANY; 356 } 349 357 } 350 358 }
Note: See TracChangeset
for help on using the changeset viewer.