Skip to content

Commit 21a1d30

Browse files
authored
Fixed usage of old-version webrtc::VideoFrame
In newer versions(including webrtc-22215-ab42706) of webrtc methods DataY (and DataU, DataV) moved from VideoFrameBuffer to PlanarYuv8Buffer which is implemented by I420Buffer. To access instance of I420Buffer GetI420() should be called.
1 parent 411005b commit 21a1d30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webrtc/samples/opencvanalyzer/objectdetector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ namespace scy {
9292
Rect crop(Point((width - cropSize.width) / 2, (height - cropSize.height) / 2), cropSize);
9393

9494
// get gray frame
95-
uint8_t* brightnessData = (uint8_t*)yuvframe.video_frame_buffer()->DataY();
95+
uint8_t* brightnessData = (uint8_t*)yuvframe.video_frame_buffer()->GetI420()->DataY();
9696

9797
Mat frame;
9898
frame.create(height, width, CV_8UC1);

0 commit comments

Comments
 (0)