Changeset 4252


Ignore:
Timestamp:
Sep 13, 2012 8:08:01 AM (7 years ago)
Author:
ming
Message:

Fixed #1581: Fixed crash in video port when the capturer is passive, its stream is passive, and converter is needed

File:
1 edited

Legend:

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

    r4168 r4252  
    333333                                prm->vidparam.dir, &prm->vidparam.fmt); 
    334334 
    335         if (vp->stream_role == ROLE_ACTIVE) { 
    336             need_frame_buf = PJ_TRUE; 
    337         } 
     335        need_frame_buf = PJ_TRUE; 
    338336    } 
    339337 
     
    655653 
    656654    if (vp->conv.conv) { 
    657         dst_frame->buf  = vp->conv.conv_buf; 
    658         dst_frame->size = vp->conv.conv_buf_size; 
     655        if (!dst_frame->buf || dst_frame->size < vp->conv.conv_buf_size) { 
     656            dst_frame->buf  = vp->conv.conv_buf; 
     657            dst_frame->size = vp->conv.conv_buf_size; 
     658        } 
    659659        status = pjmedia_converter_convert(vp->conv.conv, 
    660660                                           src_frame, dst_frame); 
Note: See TracChangeset for help on using the changeset viewer.