From 32f5229d51d2360c42ad90c3d925ce4264faa2fc Mon Sep 17 00:00:00 2001 From: El Date: Sat, 20 Dec 2025 17:17:50 +0000 Subject: [PATCH] VNC-151 Update NoVNC ref --- common/rfb/encoders/EncoderProbe.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/rfb/encoders/EncoderProbe.cpp b/common/rfb/encoders/EncoderProbe.cpp index 79e560e..3fc9167 100644 --- a/common/rfb/encoders/EncoderProbe.cpp +++ b/common/rfb/encoders/EncoderProbe.cpp @@ -82,8 +82,8 @@ namespace rfb::video_encoders { if (dri_node) { const auto err = ffmpeg.av_hwdevice_ctx_create(&hw_ctx, encoder_candidate.hw_type, dri_node, nullptr, 0); - hw_ctx_guard.reset(hw_ctx); if (err == 0) { + hw_ctx_guard.reset(hw_ctx); drm_device_path = dri_node; result.push_back(encoder_candidate.encoder); } else @@ -93,12 +93,13 @@ namespace rfb::video_encoders { vlog.debug("Trying to open all DRM devices"); for (const auto *drm_dev_path: drm_device_paths) { const auto err = ffmpeg.av_hwdevice_ctx_create(&hw_ctx, encoder_candidate.hw_type, drm_dev_path, nullptr, 0); - hw_ctx_guard.reset(hw_ctx); if (err < 0) { vlog.error("%s", ffmpeg.get_error_description(err).c_str()); continue; } + + hw_ctx_guard.reset(hw_ctx); drm_device_path = drm_dev_path; vlog.info("Found DRM device %s", drm_dev_path);