From 83849041b5ec714a41c883b1b837b1645589e6f2 Mon Sep 17 00:00:00 2001 From: ns6089 <61738816+ns6089@users.noreply.github.com> Date: Sun, 9 Jul 2023 18:30:26 +0300 Subject: [PATCH] fixup! Refactor and deduplicate colorspace logic --- src/video_colorspace.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_colorspace.cpp b/src/video_colorspace.cpp index cf00fab7a30..7d870dcbd66 100644 --- a/src/video_colorspace.cpp +++ b/src/video_colorspace.cpp @@ -28,6 +28,8 @@ namespace video { sunshine_colorspace_t colorspace_from_rtsp_csc(int csc, bool hdr_requested, bool hdr_display) { + /* See video::config_t::encoderCscMode for details */ + sunshine_colorspace_t colorspace; // When HDR is active, that overrides the colorspace the client requested @@ -62,8 +64,6 @@ namespace video { avcodec_colorspace_t avcodec_colorspace_from_sunshine_colorspace(const sunshine_colorspace_t &sunshine_colorspace) { - /* See video::config_t::encoderCscMode for details */ - avcodec_colorspace_t avcodec_colorspace; switch (sunshine_colorspace.colorspace) {