Changeset 3993 for pjproject/trunk


Ignore:
Timestamp:
Mar 29, 2012 8:46:26 AM (13 years ago)
Author:
ming
Message:

Re #1472: Fixed assertion if stream role is passive

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/vid_port.c

    r3992 r3993  
    676676    pj_status_t status; 
    677677 
    678     pj_assert(vp->role==ROLE_ACTIVE && vp->stream_role==ROLE_PASSIVE); 
     678    pj_assert(vp->role==ROLE_ACTIVE); 
    679679 
    680680    PJ_UNUSED_ARG(ts); 
     
    683683        return; 
    684684 
    685     vp->frm_buf->size = vp->frm_buf_size; 
    686     status = pjmedia_vid_dev_stream_get_frame(vp->strm, vp->frm_buf); 
    687     if (status != PJ_SUCCESS) 
    688         return; 
     685    if (vp->stream_role == ROLE_PASSIVE) { 
     686        vp->frm_buf->size = vp->frm_buf_size; 
     687        status = pjmedia_vid_dev_stream_get_frame(vp->strm, vp->frm_buf); 
     688        if (status != PJ_SUCCESS) 
     689            return; 
     690    } 
    689691 
    690692    //save_rgb_frame(vp->cap_size.w, vp->cap_size.h, vp->frm_buf); 
Note: See TracChangeset for help on using the changeset viewer.