Ignore:
Timestamp:
Jul 19, 2011 11:11:07 AM (11 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/pjmedia/src/pjmedia/endpoint.c

    r3664 r3667  
    524524} 
    525525 
     526 
     527#if defined(PJMEDIA_HAS_VIDEO) && (PJMEDIA_HAS_VIDEO != 0) 
     528 
    526529/* Create m=video SDP media line */ 
    527530PJ_DEF(pj_status_t) pjmedia_endpt_create_video_sdp(pjmedia_endpt *endpt, 
     
    531534                                                   pjmedia_sdp_media **p_m) 
    532535{ 
     536 
     537 
    533538    const pj_str_t STR_VIDEO = { "video", 5 }; 
    534539    pjmedia_sdp_media *m; 
     
    662667} 
    663668 
     669#endif /* PJMEDIA_HAS_VIDEO */ 
     670 
    664671 
    665672/** 
     
    730737    pjmedia_sdp_session *sdp; 
    731738    pjmedia_sdp_media *m; 
    732     unsigned i; 
    733739    pj_status_t status; 
    734740 
     
    751757    sdp->media[sdp->media_count++] = m; 
    752758 
    753     /* The remaining stream, if any, are videos (by convention as well) */ 
    754     for (i=1; i<stream_cnt; ++i) { 
    755         status = pjmedia_endpt_create_video_sdp(endpt, pool, 
    756                                                 &sock_info[i], 0, &m); 
    757         if (status != PJ_SUCCESS) 
    758             return status; 
    759         sdp->media[sdp->media_count++] = m; 
    760     } 
     759#if defined(PJMEDIA_HAS_VIDEO) && (PJMEDIA_HAS_VIDEO != 0) 
     760    { 
     761        unsigned i; 
     762 
     763        /* The remaining stream, if any, are videos (by convention as well) */ 
     764        for (i=1; i<stream_cnt; ++i) { 
     765            status = pjmedia_endpt_create_video_sdp(endpt, pool, 
     766                                                    &sock_info[i], 0, &m); 
     767            if (status != PJ_SUCCESS) 
     768                return status; 
     769            sdp->media[sdp->media_count++] = m; 
     770        } 
     771    } 
     772#endif 
    761773 
    762774    /* Done */ 
Note: See TracChangeset for help on using the changeset viewer.