Ignore:
Timestamp:
Feb 1, 2010 11:23:54 AM (15 years ago)
Author:
nanang
Message:

Ticket #766:

File:
1 edited

Legend:

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

    r2394 r3085  
    124124        /* Allocate temporary output buffer */ 
    125125        size = (unsigned) (resample->frame_size * sizeof(pj_int16_t) *  
    126                            resample->factor / channel_count); 
     126                           resample->factor / channel_count + 0.5); 
    127127        resample->tmp_buffer = (pj_int16_t*) pj_pool_alloc(pool, size); 
    128128        PJ_ASSERT_RETURN(resample->tmp_buffer, PJ_ENOMEM); 
     
    246246         
    247247            mono_frm_sz_in  = resample->frame_size / resample->channel_cnt; 
    248             mono_frm_sz_out = (unsigned)(mono_frm_sz_in * resample->factor); 
     248            mono_frm_sz_out = (unsigned)(mono_frm_sz_in * resample->factor + 0.5); 
    249249 
    250250            /* Deinterleave input */ 
Note: See TracChangeset for help on using the changeset viewer.