fix, check video_queue len rather than len when refresh (#8469)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-06-25 18:30:32 +08:00 committed by GitHub
parent 93133b9a6c
commit c1c2d26ec7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1048,7 +1048,7 @@ impl<T: InvokeUiSession> Remote<T> {
for (display, video_queue) in self.video_queue_map.read().unwrap().iter() {
let tolerable = std::cmp::min(decode_fps, video_queue.capacity() / 2);
if ctl.refresh_times < 20 // enough
&& (len > tolerable
&& (video_queue.len() > tolerable
&& (ctl.refresh_times == 0 || ctl.last_refresh_instant.elapsed().as_secs() > 10))
{
// Refresh causes client set_display, left frames cause flickering.