Merge pull request #2895 from jpark37/mac-resize

mac-capture: Use resize instead of reserve
master
Jim 2020-05-09 15:58:46 -07:00 committed by GitHub
commit 0c71a9c3f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ static inline void capture_frame(struct window_capture *wc)
size_t height = CGImageGetHeight(img);
CGRect rect = {{0, 0}, {width, height}};
da_reserve(wc->buffer, width * height * 4);
da_resize(wc->buffer, width * height * 4);
uint8_t *data = wc->buffer.array;
CGContextRef cg_context = CGBitmapContextCreate(