Fix hevc decode error "Could not find ref with POC" (#9960)

1. Dropping frames can cause this error, reset encoder when this
   happens.
2. There are some logic error for clear video queue, because video queue
   message is not cleared. This need to be fixed.

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-11-18 23:03:27 +08:00 committed by GitHub
parent 8b710f62c8
commit c5426b0fbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 5 deletions

View file

@ -1146,9 +1146,13 @@ impl<T: InvokeUiSession> Remote<T> {
.ok();
} else {
if let Some(video_queue) = video_queue_write.get_mut(&display) {
video_queue.force_push(vf);
if video_queue.force_push(vf).is_some() {
while let Some(_) = video_queue.pop() {}
self.handler.refresh_video(display as _);
} else {
self.video_sender.send(MediaData::VideoQueue(display)).ok();
}
}
self.video_sender.send(MediaData::VideoQueue(display)).ok();
}
self.fps_control
.last_active_time