1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 03:03:02 +01:00

Fixed incorrect colors during video capture

This commit is contained in:
cnhenry 2015-07-30 02:05:17 -05:00
parent 9b6efb65de
commit fcdc8e8b67

View File

@ -401,7 +401,7 @@ void* video_thread_poll (void* arg) // TODO: maybe use thread for every input so
uint16_t video_height = device->video_height; uint16_t video_height = device->video_height;
int screen = DefaultScreen(device->x_display); int screen = DefaultScreen(device->x_display);
yuv422to420(device->input.planes[0], device->input.planes[1], device->input.planes[2], data, video_width, video_height); yuv422to420(device->input.planes[0], device->input.planes[2], device->input.planes[1], data, video_width, video_height);
uint8_t *img_data = malloc(video_width * video_height * 4); uint8_t *img_data = malloc(video_width * video_height * 4);
yuv420tobgr(video_width, video_height, device->input.planes[0], device->input.planes[1], device->input.planes[2], video_width, video_width/2, video_width/2, img_data); yuv420tobgr(video_width, video_height, device->input.planes[0], device->input.planes[1], device->input.planes[2], video_width, video_width/2, video_width/2, img_data);