Store 3 decoded frames for more robust stitching

This commit is contained in:
Patrick Nicolas
2024-03-05 10:37:06 +01:00
parent 7a158608c4
commit a2b8955c12
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -225,10 +225,12 @@ void scenes::stream::push_blit_handle(shard_accumulator * decoder, std::shared_p
{
if (i.decoder.get() == decoder)
{
static_assert(std::tuple_size_v<decltype(i.latest_frames)> == 2);
std::swap(removed, i.latest_frames[0]);
std::swap(i.latest_frames[0], i.latest_frames[1]);
std::swap(i.latest_frames[1], handle);
for (size_t j = 1 ; j < i.latest_frames.size() ; ++j)
{
std::swap(i.latest_frames[j-1], i.latest_frames[j]);
}
std::swap(i.latest_frames.back(), handle);
break;
}
}