Ignore:
Timestamp:
Jul 19, 2011 11:11:07 AM (13 years ago)
Author:
nanang
Message:

Fixed #1271: protected all video features with PJMEDIA_HAS_VIDEO macro setting.

File:
1 edited

Legend:

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

    r3664 r3667  
    383383    PJ_ASSERT_RETURN(pjsua_var.tpdata[0].data.ptr != NULL, PJ_EINVALIDOP); 
    384384 
     385    /* Verify media count */ 
     386#if !defined(PJMEDIA_HAS_VIDEO) || (PJMEDIA_HAS_VIDEO == 0) 
     387    PJ_ASSERT_RETURN(cfg->max_video_cnt == 0, PJ_EINVAL); 
     388#endif 
     389    PJ_ASSERT_RETURN(cfg->max_audio_cnt + cfg->max_video_cnt <=  
     390                     PJSUA_MAX_CALL_MEDIA, PJ_ETOOMANY); 
     391 
    385392    PJSUA_LOCK(); 
    386393 
     
    641648    PJ_ASSERT_RETURN(acc_id>=0 && acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc), 
    642649                     PJ_EINVAL); 
     650 
     651    /* Verify media count */ 
     652#if !defined(PJMEDIA_HAS_VIDEO) || (PJMEDIA_HAS_VIDEO == 0) 
     653    PJ_ASSERT_RETURN(cfg->max_video_cnt == 0, PJ_EINVAL); 
     654#endif 
     655    PJ_ASSERT_RETURN(cfg->max_audio_cnt + cfg->max_video_cnt <=  
     656                     PJSUA_MAX_CALL_MEDIA, PJ_ETOOMANY); 
     657 
    643658 
    644659    PJSUA_LOCK(); 
Note: See TracChangeset for help on using the changeset viewer.