diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp index cb4f3e5c..543d785a 100644 --- a/client/scenes/stream.cpp +++ b/client/scenes/stream.cpp @@ -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)) diff --git a/common/wivrn_packets.h b/common/wivrn_packets.h index 1a814e31..14c6c918 100644 --- a/common/wivrn_packets.h +++ b/common/wivrn_packets.h @@ -659,6 +659,8 @@ struct video_stream_description uint16_t height; std::array codec; // left, right, alpha float fps; + + bool operator==(const video_stream_description &) const = default; }; class video_stream_data_shard