From 1e32ee42c97a3294e87a729048f3c5d8d93213d5 Mon Sep 17 00:00:00 2001 From: Tamir Date: Sun, 3 Dec 2023 13:15:25 +0200 Subject: [PATCH] sequence of lines changed --- src/ds/ds-motion-common.cpp | 4 ++-- src/gl/upload.cpp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ds/ds-motion-common.cpp b/src/ds/ds-motion-common.cpp index 155468fce8..29411081c3 100644 --- a/src/ds/ds-motion-common.cpp +++ b/src/ds/ds-motion-common.cpp @@ -173,10 +173,10 @@ namespace librealsense if (p->get_stream_type() == RS2_STREAM_ACCEL || p->get_stream_type() == RS2_STREAM_GYRO) { auto motion = dynamic_cast(p.get()); - auto st = p->get_stream_type(); - if (!motion) throw std::runtime_error("Stream profile is not motion stream profile"); + + auto st = p->get_stream_type(); motion->set_intrinsics([this, st]() { return get_motion_intrinsics(st); }); } } diff --git a/src/gl/upload.cpp b/src/gl/upload.cpp index 325eb724a6..2adc97f31c 100644 --- a/src/gl/upload.cpp +++ b/src/gl/upload.cpp @@ -75,12 +75,11 @@ namespace librealsense if (new_f) perform_gl_action([&]() { auto gf = dynamic_cast((frame_interface*)new_f.get()); - - uint32_t output_yuv; - if (!gf) throw std::runtime_error("Frame is not gpu_addon_interface, cannot output texture"); + uint32_t output_yuv; + gf->get_gpu_section().output_texture(0, &output_yuv, TEXTYPE_UINT16); glBindTexture(GL_TEXTURE_2D, output_yuv); glTexImage2D(GL_TEXTURE_2D, 0, GL_RG8, width, height, 0, GL_RG, GL_UNSIGNED_BYTE, f.get_data());