Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1007)

Unified Diff: webrtc/examples/peerconnection/client/linux/main_wnd.cc

Issue 2604323002: Fixing peerconnection reddish video issue (Closed)
Patch Set: Rebasing Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/peerconnection/client/linux/main_wnd.cc
diff --git a/webrtc/examples/peerconnection/client/linux/main_wnd.cc b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
index 3070719b6400c11b2a49e500bb036fd67407f78e..067dde97e148b77eb01f4e7c20aac84df6dbd273 100644
--- a/webrtc/examples/peerconnection/client/linux/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
@@ -531,7 +531,13 @@ void GtkMainWnd::VideoRenderer::OnFrame(
}
SetSize(buffer->width(), buffer->height());
- libyuv::I420ToRGBA(buffer->DataY(), buffer->StrideY(),
+ // The order in the name of libyuv::I420To(ABGR,RGBA) is ambiguous because
+ // it doesn't tell you if it is referring to how it is laid out in memory as
+ // bytes or if endiannes is taken into account.
+ // This was supposed to be a call to libyuv::I420ToRGBA but it was resulting
+ // in a reddish video output (see https://bugs.webrtc.org/6857) because it
+ // was producing an unexpected byte order (ABGR, byte swapped).
+ libyuv::I420ToABGR(buffer->DataY(), buffer->StrideY(),
buffer->DataU(), buffer->StrideU(),
buffer->DataV(), buffer->StrideV(),
image_.get(), width_ * 4,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698