Changeset 5049


Ignore:
Timestamp:
Apr 7, 2015 9:25:07 AM (5 years ago)
Author:
riza
Message:

Misc (re #1782): Check if capturer is opened when getting window information. On slow devices (iPhone 3GS) the capturer might not be opened when the format changed is requested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c

    r4996 r5049  
    12511251    PJSUA_LOCK(); 
    12521252    w = &pjsua_var.win[wid]; 
    1253  
     1253     
    12541254    wi->is_native = w->is_native; 
    12551255 
     
    12581258        pjmedia_vid_dev_cap cap = PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW; 
    12591259 
    1260         cap_strm = pjmedia_vid_port_get_stream(w->vp_cap); 
    1261         if (!cap_strm) { 
     1260        if (!w->vp_cap) { 
    12621261            status = PJ_EINVAL; 
    12631262        } else { 
    1264             status = pjmedia_vid_dev_stream_get_cap(cap_strm, cap, &wi->hwnd); 
    1265         } 
    1266  
     1263            cap_strm = pjmedia_vid_port_get_stream(w->vp_cap); 
     1264            if (!cap_strm) { 
     1265                status = PJ_EINVAL; 
     1266            } else { 
     1267                status = pjmedia_vid_dev_stream_get_cap(cap_strm, cap,  
     1268                                                        &wi->hwnd); 
     1269            } 
     1270        } 
    12671271        PJSUA_UNLOCK(); 
    12681272        return status; 
Note: See TracChangeset for help on using the changeset viewer.