Ignore:
Timestamp:
Apr 8, 2011 4:04:25 AM (14 years ago)
Author:
ming
Message:

Re #1213:

  • Add pjmedia_frame_copy()
  • Add converter for renderer videoport
  • Add checking in SDL device since it may receive a frame size bigger than expected
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/sdl_dev.c

    r3499 r3509  
    734734    } 
    735735 
    736     if (frame->size==0 || frame->buf==NULL) 
     736    if (frame->size==0 || frame->buf==NULL || 
     737        frame->size < stream->vafp.framebytes) 
    737738        goto on_return; 
    738739 
     
    746747        } 
    747748         
    748         pj_memcpy(stream->surf->pixels, frame->buf, frame->size); 
     749        pj_memcpy(stream->surf->pixels, frame->buf, 
     750                  stream->vafp.framebytes); 
    749751         
    750752        if (SDL_MUSTLOCK(stream->surf)) { 
Note: See TracChangeset for help on using the changeset viewer.