Index: webrtc/media/base/videobroadcaster.cc |
diff --git a/webrtc/media/base/videobroadcaster.cc b/webrtc/media/base/videobroadcaster.cc |
index 6d6ffa747c74fa212c97fa2639d5b591b65021d8..6655d9365631a690627b7d3fd9dbc55a7e9a3ec5 100644 |
--- a/webrtc/media/base/videobroadcaster.cc |
+++ b/webrtc/media/base/videobroadcaster.cc |
@@ -12,6 +12,7 @@ |
#include <limits> |
+#include "webrtc/api/video/i420_buffer.h" |
#include "webrtc/base/checks.h" |
#include "webrtc/base/logging.h" |
@@ -109,8 +110,8 @@ VideoBroadcaster::GetBlackFrameBuffer(int width, int height) { |
if (!black_frame_buffer_ || black_frame_buffer_->width() != width || |
black_frame_buffer_->height() != height) { |
rtc::scoped_refptr<webrtc::I420Buffer> buffer = |
- new RefCountedObject<webrtc::I420Buffer>(width, height); |
- buffer->SetToBlack(); |
+ webrtc::I420Buffer::Create(width, height); |
+ webrtc::I420Buffer::SetBlack(buffer.get()); |
black_frame_buffer_ = buffer; |
} |