viewer: reimplement still support in a more robust way

This commit is contained in:
itsmattkc
2021-04-13 15:47:04 +10:00
parent 2798737c19
commit 09009e01fc
+3 -2
View File
@@ -398,6 +398,7 @@ bool ViewerWidget::ShouldForceWaveform() const
void ViewerWidget::UpdateTextureFromNode(const rational& time)
{
bool frame_exists_at_time = FrameExistsAtTime(time);
bool frame_might_be_still = GetConnectedNode() && GetConnectedNode()->GetVideoLength().isNull();
// Check playback queue for a frame
if (IsPlaying()) {
@@ -434,13 +435,13 @@ void ViewerWidget::UpdateTextureFromNode(const rational& time)
}
// Only show warning if frame actually exists
if (frame_exists_at_time) {
if (frame_exists_at_time && !frame_might_be_still) {
qWarning() << "Playback queue failed to keep up";
}
}
if (frame_exists_at_time) {
if (frame_exists_at_time || frame_might_be_still) {
// Frame was not in queue, will require rendering or decoding from cache
RenderTicketWatcher* watcher = new RenderTicketWatcher();
connect(watcher, &RenderTicketWatcher::Finished, this, &ViewerWidget::RendererGeneratedFrame);