Don't recreate decoders if only fps changes

This commit is contained in:
Patrick Nicolas
2025-01-07 20:07:10 +01:00
parent ad9300f842
commit da14e8450d
2 changed files with 32 additions and 14 deletions
+1 -2
View File
@@ -738,7 +738,6 @@ static xrt_result_t comp_wivrn_request_refresh_rate(struct comp_target * ct, flo
auto from = cn->desc.fps;
cn->desc.fps = refresh_rate_hz;
cn->pacer.set_frame_duration(U_TIME_1S_IN_NS / refresh_rate_hz);
cn->cnx.send_control(decltype(cn->desc)(cn->desc));
cn->cnx.push_event(
{
.display = {
@@ -747,7 +746,7 @@ static xrt_result_t comp_wivrn_request_refresh_rate(struct comp_target * ct, flo
.to_display_refresh_rate_hz = refresh_rate_hz,
},
});
cn->reset_encoders();
cn->cnx.send_control(to_headset::video_stream_description{cn->desc});
return XRT_SUCCESS;
}