Don't reset decoders if there's no change

This commit is contained in:
Patrick Nicolas
2026-03-05 10:56:07 +01:00
parent 9690633030
commit 02d06562a6
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -1137,8 +1137,10 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
{
session.set_refresh_rate(description.fps);
spdlog::info("Creating decoders, size {}x{}", description.width, description.height);
std::unique_lock lock(decoder_mutex);
if (video_stream_description == description)
return;
spdlog::info("Creating decoders, size {}x{}", description.width, description.height);
video_stream_description = description;
for (const auto & [stream_index, item]: utils::enumerate(decoders))
+2
View File
@@ -659,6 +659,8 @@ struct video_stream_description
uint16_t height;
std::array<video_codec, 3> codec; // left, right, alpha
float fps;
bool operator==(const video_stream_description &) const = default;
};
class video_stream_data_shard