From 50e9b2f740c8fb0decb0d00b5583fb6d8b1fa3b2 Mon Sep 17 00:00:00 2001 From: Yukino Song Date: Sat, 8 Feb 2025 16:11:54 +0800 Subject: [PATCH] Potentially fix avcodec BIG F to Sunshine --- src/audio.h | 8 ++++++-- src/video.h | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/audio.h b/src/audio.h index b6c75a1c..29f6bf17 100644 --- a/src/audio.h +++ b/src/audio.h @@ -52,11 +52,15 @@ namespace audio { int channels; int mask; - bool input_only; - stream_params_t customStreamParams; std::bitset flags; + + // Who TF knows what Sunshine did + // putting input_only at the end of flags will always be over written to true + uint64_t __padding; + + bool input_only; }; struct audio_ctx_t { diff --git a/src/video.h b/src/video.h index 27f74f24..621bc51f 100644 --- a/src/video.h +++ b/src/video.h @@ -21,10 +21,12 @@ namespace video { /* Encoding configuration requested by remote client */ struct config_t { + // DO NOT CHANGE ORDER OR ADD FIELDS IN THE MIDDLE!!!!! + // ONLY APPEND NEW FIELD AFTERWARDS!!!!!!!!! + // BIG F WORD to Sunshine!!!!!!!!! int width; // Video width in pixels int height; // Video height in pixels int framerate; // Requested framerate, used in individual frame bitrate budget calculation - int encodingFramerate; // Requested display framerate int bitrate; // Video bitrate in kilobits (1000 bits) for requested framerate int slicesPerFrame; // Number of slices per frame int numRefFrames; // Max number of reference frames @@ -44,6 +46,7 @@ namespace video { int enableIntraRefresh; // 0 - disabled, 1 - enabled + int encodingFramerate; // Requested display framerate bool input_only; };