From e4acf2401e7fe728746ac40014ed84221ef2cb5f Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Mon, 6 Oct 2025 13:47:28 +0200 Subject: [PATCH] Default passthrough encoder to encoder[0] settings --- docs/configuration.md | 3 ++- server/encoder/encoder_settings.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index e74a45be..7e050913 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -158,7 +158,8 @@ Json object of additional options to pass directly to ffmpeg `avcodec_open2`'s ` ## `encoder-passthrough` -The single encoder used for passthrough (transparency), contains the same elements as the other encoders, except for width/height and offsets. +The single encoder used for passthrough (transparency), contains the same elements as the other encoders, except for width/height and offsets which are ignored. +Default values are those computed for the first encoder. ## `application` Default value: unset diff --git a/server/encoder/encoder_settings.cpp b/server/encoder/encoder_settings.cpp index da6c942a..b79fd22b 100644 --- a/server/encoder/encoder_settings.cpp +++ b/server/encoder/encoder_settings.cpp @@ -359,7 +359,7 @@ std::vector get_encoder_settings(wivrn_vk_bundle & bundle, uin if (config.encoders.empty()) config.encoders = get_encoder_default_settings(bundle, info.supported_codecs, config.bit_depth); if (not config.encoder_passthrough) - config.encoder_passthrough.emplace(); + config.encoder_passthrough = config.encoders.front(); config.encoder_passthrough->width = 1; config.encoder_passthrough->height = 1;