summaryrefslogtreecommitdiff
path: root/src/wx/simple_video_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-23 10:42:16 +0100
committerCarl Hetherington <cth@carlh.net>2020-01-08 21:56:47 +0100
commit89e92b3e7effafd2ca3aa1e9300777f2d2fb6183 (patch)
treebb542303b25fd0a09be1df91319beb67e1609759 /src/wx/simple_video_view.cc
parentac69a0eb81e23a341545e05fa12a0e26070cb222 (diff)
Don't busy-wait when there's nothing to play.
Diffstat (limited to 'src/wx/simple_video_view.cc')
-rw-r--r--src/wx/simple_video_view.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wx/simple_video_view.cc b/src/wx/simple_video_view.cc
index 6eabbc0b0..e349b865c 100644
--- a/src/wx/simple_video_view.cc
+++ b/src/wx/simple_video_view.cc
@@ -159,7 +159,7 @@ SimpleVideoView::timer ()
}
LOG_DEBUG_PLAYER("%1 -> %2; delay %3", next.seconds(), _viewer->time().seconds(), max((next.seconds() - _viewer->time().seconds()) * 1000, 1.0));
- _timer.Start (time_until_next_frame(), wxTIMER_ONE_SHOT);
+ _timer.Start (time_until_next_frame().get_value_or(0), wxTIMER_ONE_SHOT);
if (_viewer->butler()) {
_viewer->butler()->rethrow ();