Changeset 1847


Ignore:
Timestamp:
Mar 5, 2008 5:41:42 PM (17 years ago)
Author:
bennylp
Message:

More ticket #438: wrong param passed to shrink_buffer() in set_max_cnt(), should be (buf_cnt - new_max_cnt), instead of (old_max_cnt - new_max_cnt)

File:
1 edited

Legend:

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

    r1844 r1847  
    281281    } 
    282282 
    283     shrink_buffer(b, old_max_cnt - new_max_cnt); 
     283    /* If samples number in the buffer > new_max_cnt, reduce samples first */ 
     284    if (b->buf_cnt > new_max_cnt) 
     285        shrink_buffer(b, b->buf_cnt - new_max_cnt); 
    284286 
    285287    /* Adjust buffer to accomodate the new max_cnt so the samples is secured. 
Note: See TracChangeset for help on using the changeset viewer.