Changeset 3912


Ignore:
Timestamp:
Dec 15, 2011 10:11:51 AM (12 years ago)
Author:
nanang
Message:

Fix #1427: added check if video_cnt in call option should be increased while trying to enable a video stream.

File:
1 edited

Legend:

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

    r3905 r3912  
    16961696        pj_pool_t *pool = call->inv->pool_prov; 
    16971697        pjmedia_sdp_media *sdp_m; 
     1698 
     1699        /* Enabling video */ 
     1700        if (call_med->dir == PJMEDIA_DIR_NONE) { 
     1701            unsigned i, vid_cnt = 0; 
     1702 
     1703            /* Check if video_cnt in call option needs to be increased */ 
     1704            for (i = 0; i < call->med_cnt; ++i) { 
     1705                if (call->media[i].type == PJMEDIA_TYPE_VIDEO && 
     1706                    call->media[i].dir != PJMEDIA_DIR_NONE) 
     1707                { 
     1708                    ++vid_cnt; 
     1709                } 
     1710            } 
     1711            if (call->opt.video_cnt <= vid_cnt) 
     1712                call->opt.video_cnt++; 
     1713        } 
    16981714 
    16991715        status = pjsua_call_media_init(call_med, PJMEDIA_TYPE_VIDEO, 
Note: See TracChangeset for help on using the changeset viewer.