Skip to content

Commit 3e1e14d

Browse files
author
DESKTOP-1P165K6\dev
committed
correct writeback video frame mencpy
1 parent c771fff commit 3e1e14d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Android/APIExample/lib-raw-data/src/main/cpp/io_agora_advancedvideo_rawdata_MediaPreProcessing.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ class AgoraVideoFrameObserver : public agora::media::IVideoFrameObserver
9595
int height = videoFrame.height;
9696
size_t widthAndHeight = (size_t) videoFrame.yStride * height;
9797

98-
memcpy(videoFrame.yBuffer, byteBuffer, widthAndHeight);
99-
memcpy(videoFrame.uBuffer, (uint8_t *) byteBuffer + widthAndHeight, widthAndHeight / 4);
100-
memcpy(videoFrame.vBuffer, (uint8_t *) byteBuffer + widthAndHeight * 5 / 4,
98+
memcpy(byteBuffer, videoFrame.yBuffer, widthAndHeight);
99+
memcpy((uint8_t *) byteBuffer + widthAndHeight, videoFrame.uBuffer, widthAndHeight / 4);
100+
memcpy((uint8_t *) byteBuffer + widthAndHeight * 5 / 4, videoFrame.vBuffer,
101101
widthAndHeight / 4);
102102
}
103103

0 commit comments

Comments
 (0)