Changeset 4013 for pjproject/trunk


Ignore:
Timestamp:
Apr 4, 2012 4:43:05 AM (13 years ago)
Author:
bennylp
Message:

Misc (re #1446): fixed crash if unregistered format is specified when opening device with the video port

File:
1 edited

Legend:

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

    r4009 r4013  
    176176    const pjmedia_video_format_detail *vfd; 
    177177    char dev_name[64]; 
     178    char fmt_name[5]; 
    178179    pjmedia_vid_dev_cb vid_cb; 
    179180    pj_bool_t need_frame_buf = PJ_FALSE; 
     
    235236    vp->stream_role = di.has_callback ? ROLE_ACTIVE : ROLE_PASSIVE; 
    236237 
     238    pjmedia_fourcc_name(vparam.fmt.id, fmt_name); 
     239 
    237240    PJ_LOG(4,(THIS_FILE, 
    238241              "Opening device %s for %s: format=%s, size=%dx%d @%d:%d fps", 
    239242              dev_name, 
    240               vid_dir_name(prm->vidparam.dir), 
    241               pjmedia_get_video_format_info(NULL, vparam.fmt.id)->name, 
     243              vid_dir_name(prm->vidparam.dir), fmt_name, 
    242244              vfd->size.w, vfd->size.h, 
    243245              vfd->fps.num, vfd->fps.denum)); 
     
    262264    PJ_LOG(4,(THIS_FILE, 
    263265              "Device %s opened: format=%s, size=%dx%d @%d:%d fps", 
    264               dev_name, 
    265               pjmedia_get_video_format_info(NULL, vparam.fmt.id)->name, 
     266              dev_name, fmt_name, 
    266267              vparam.fmt.det.vid.size.w, vparam.fmt.det.vid.size.h, 
    267268              vparam.fmt.det.vid.fps.num, vparam.fmt.det.vid.fps.denum)); 
Note: See TracChangeset for help on using the changeset viewer.