viewer: display image infinitely if video length is null

Allows for displaying still images in viewer without a finite length.
This commit is contained in:
itsmattkc
2020-09-19 12:52:50 +10:00
parent 855c460ff3
commit 7bc841904a
+3 -1
View File
@@ -566,7 +566,9 @@ QString ViewerWidget::GetCachedFilenameFromTime(const rational &time)
bool ViewerWidget::FrameExistsAtTime(const rational &time)
{
return GetConnectedNode() && time >= 0 && time < GetConnectedNode()->video_frame_cache()->GetLength();
return GetConnectedNode()
&& ((time >= 0 && time < GetConnectedNode()->video_frame_cache()->GetLength())
|| GetConnectedNode()->video_frame_cache()->GetLength().isNull());
}
void ViewerWidget::SetDisplayImage(FramePtr frame, bool main_only)