Skip to content
Snippets Groups Projects
Commit b0223a7e authored by Anthony Léonard's avatar Anthony Léonard Committed by Andreas Traczyk
Browse files

fix color channels on macOS


Incorrect condition was leading to bad pixel format conversion before
sending frames to client on macOS (BGR instead of correct RGB).

Change-Id: Ie76a488c4151d00249ed1adb5b0b02e43d2972eb
Reviewed-by: default avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 7a46d091
No related branches found
No related tags found
No related merge requests found
......@@ -343,11 +343,12 @@ SinkClient::update(Observable<std::shared_ptr<VideoFrame>>* /*obs*/,
VideoScaler scaler;
const int width = f.width();
const int height = f.height();
#if (defined(__ANDROID__) || (defined(__APPLE__)) && !defined(TARGET_OS_IPHONE))
#if defined(__ANDROID__) || (defined(__APPLE__) && !TARGET_OS_IPHONE)
const int format = VIDEO_PIXFMT_RGBA;
#else
const int format = VIDEO_PIXFMT_BGRA;
#endif
const auto bytes = videoFrameSize(format, width, height);
if (bytes > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment