Skip to content

Commit

Permalink
viewer: display image infinitely if video length is null
Browse files Browse the repository at this point in the history
Allows for displaying still images in viewer without a finite length.
  • Loading branch information
itsmattkc committed Sep 19, 2020
1 parent 855c460 commit 7bc8419
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/widget/viewer/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7bc8419

Please sign in to comment.