Changeset 6095 for pjproject


Ignore:
Timestamp:
Oct 21, 2019 1:58:11 AM (5 years ago)
Author:
nanang
Message:

Fix #2247: Distorted video sent by iOS 13 devices.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/vid_toolbox.m

    r6078 r6095  
    798798        count = CVPixelBufferGetPlaneCount(image_buf); 
    799799        for (i = 0; i < count; i++) { 
    800             void *ptr = CVPixelBufferGetBaseAddressOfPlane(image_buf, i); 
    801             size_t bpr = CVPixelBufferGetBytesPerRow(image_buf); 
    802              
    803             pj_assert(bpr = plane_bpr[i]); 
    804             pj_memcpy(ptr, base_addr[i], plane_bpr[i] * plane_h[i]); 
     800            char *ptr = (char*)CVPixelBufferGetBaseAddressOfPlane(image_buf, i); 
     801            char *src = (char*)base_addr[i]; 
     802            size_t bpr = CVPixelBufferGetBytesPerRowOfPlane(image_buf, i); 
     803            int j; 
     804 
     805            pj_assert(bpr >= plane_bpr[i]); 
     806            for (j = 0; j < plane_h[i]; ++j) { 
     807                pj_memcpy(ptr, src, plane_bpr[i]); 
     808                src += plane_bpr[i]; 
     809                ptr += bpr; 
     810            } 
    805811        } 
    806812 
Note: See TracChangeset for help on using the changeset viewer.