Changeset 2520 for pjproject


Ignore:
Timestamp:
Mar 17, 2009 5:35:27 PM (16 years ago)
Author:
bennylp
Message:

Part of APS-Direct (ticket #738): crash in stream.c when stream_info->param is NULL

File:
1 edited

Legend:

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

    r2506 r2520  
    15981598    stream->port.info.clock_rate = info->fmt.clock_rate; 
    15991599    stream->port.info.channel_count = info->fmt.channel_cnt; 
    1600     stream->port.info.format.id = info->param->info.fmt_id; 
    16011600    stream->port.port_data.pdata = stream; 
    1602     if (stream->port.info.format.id == PJMEDIA_FORMAT_L16) { 
     1601    if (info->param==NULL || info->param->info.fmt_id == PJMEDIA_FORMAT_L16) { 
     1602        stream->port.info.format.id = PJMEDIA_FORMAT_L16; 
     1603 
    16031604        stream->port.put_frame = &put_frame; 
    16041605        stream->port.get_frame = &get_frame; 
    16051606    } else { 
     1607        stream->port.info.format.id = info->param->info.fmt_id; 
    16061608        stream->port.info.format.bitrate = info->param->info.avg_bps; 
    16071609        stream->port.info.format.vad = (info->param->setting.vad != 0); 
Note: See TracChangeset for help on using the changeset viewer.