Don't busy-wait when there's nothing to play.
[dcpomatic.git] / src / wx / simple_video_view.cc
index 6eabbc0b033018f11737e5648443ef4bbb6f77e4..e349b865cf03185531318a20eae95a7bda40bf29 100644 (file)
@@ -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 ();