Skip to content

Commit

Permalink
sequence of lines changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamir91 committed Dec 3, 2023
1 parent 9e0f0f8 commit 1e32ee4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ds/ds-motion-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<motion_stream_profile_interface*>(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); });
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/gl/upload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ namespace librealsense
if (new_f) perform_gl_action([&]()
{
auto gf = dynamic_cast<gpu_addon_interface*>((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());
Expand Down

0 comments on commit 1e32ee4

Please sign in to comment.