Ignore:
Timestamp:
Oct 6, 2011 6:05:36 AM (13 years ago)
Author:
bennylp
Message:

Misc (re #1370): calling pjmedia_vid_port_start() more than once had caused freezing capture video if preview is enabled before making video calls

File:
1 edited

Legend:

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

    r3790 r3793  
    828828            pjsua_vid_win *w; 
    829829            pjsua_vid_win_id wid; 
     830            pj_bool_t just_created = PJ_FALSE; 
    830831 
    831832            PJ_LOG(4,(THIS_FILE, "Setting up TX..")); 
     
    860861                    return status; 
    861862                } 
     863                just_created = PJ_TRUE; 
    862864            } 
    863865 
     
    884886 
    885887            /* Start capturer */ 
    886             status = pjmedia_vid_port_start(w->vp_cap); 
    887             if (status != PJ_SUCCESS) { 
    888                 pj_log_pop_indent(); 
    889                 goto on_error; 
     888            if (just_created) { 
     889                status = pjmedia_vid_port_start(w->vp_cap); 
     890                if (status != PJ_SUCCESS) { 
     891                    pj_log_pop_indent(); 
     892                    goto on_error; 
     893                } 
    890894            } 
    891895 
Note: See TracChangeset for help on using the changeset viewer.