V4L2: Fix error with byte order of RGB32

Former-commit-id: ad354369b22d4e85b0b2fbf2d1c33611632d7014
This commit is contained in:
johan 2014-04-15 20:44:16 +02:00
parent ef6aa76409
commit d102ffd043
2 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
62843d7b04fbbe0a2ae994531100d2f3f3d73b11 d61b685eca164580cb39eb5bc3cf65b89afad410

View File

@ -737,9 +737,9 @@ void V4L2Grabber::process_image(const uint8_t * data)
case PIXELFORMAT_RGB32: case PIXELFORMAT_RGB32:
{ {
int index = (_width * ySource + xSource) * 4; int index = (_width * ySource + xSource) * 4;
rgb.red = data[index+1]; rgb.red = data[index ];
rgb.green = data[index+2]; rgb.green = data[index+1];
rgb.blue = data[index+3]; rgb.blue = data[index+2];
} }
break; break;
default: default: