Changeset 1866 for pjproject


Ignore:
Timestamp:
Mar 13, 2008 10:15:16 AM (17 years ago)
Author:
bennylp
Message:

More ticket #504: buffer overflow in splitcomb when handling stereo audio

Location:
pjproject/trunk
Files:
2 edited

Legend:

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

    r1844 r1866  
    656656                         (pj_int16_t*)frame->buf, ch, 
    657657                         this_port->info.channel_count, 
    658                          this_port->info.samples_per_frame); 
     658                         this_port->info.samples_per_frame / 
     659                         this_port->info.channel_count); 
    659660 
    660661        has_frame = PJ_TRUE; 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r1860 r1866  
    161161     * reference. 
    162162     */ 
     163    pjsua_var.mconf_cfg.channel_count = 1; 
     164    pjsua_var.mconf_cfg.bits_per_sample = 16; 
    163165    pjsua_var.mconf_cfg.samples_per_frame = pjsua_var.media_cfg.clock_rate *  
     166                                            pjsua_var.mconf_cfg.channel_count * 
    164167                                            pjsua_var.media_cfg.audio_frame_ptime /  
    165168                                            1000; 
    166     pjsua_var.mconf_cfg.channel_count = 1; 
    167     pjsua_var.mconf_cfg.bits_per_sample = 16; 
    168169 
    169170    /* Init options for conference bridge. */ 
Note: See TracChangeset for help on using the changeset viewer.