fix(camera): use video frame types for dimensions

This commit is contained in:
linbo 2026-08-26 15:01:29 +08:00
parent 472809dea5
commit 4f5c4eaa13

View File

@ -754,8 +754,8 @@ void RealsenseCamera::streaming_worker_() {
rs2::frameset frames; rs2::frameset frames;
frames = get_frameset(true); frames = get_frameset(true);
rs2::frame color_frame = frames.get_color_frame(); rs2::video_frame color_frame = frames.get_color_frame();
rs2::frame depth_frame = frames.get_depth_frame(); rs2::depth_frame depth_frame = frames.get_depth_frame();
const bool needs_color = stream_mode_ == COLOR_MODE || stream_mode_ == RGBD_MODE; const bool needs_color = stream_mode_ == COLOR_MODE || stream_mode_ == RGBD_MODE;
const bool needs_depth = stream_mode_ == DEPTH_MODE || stream_mode_ == RGBD_MODE; const bool needs_depth = stream_mode_ == DEPTH_MODE || stream_mode_ == RGBD_MODE;
if (needs_color && !color_frame) { if (needs_color && !color_frame) {