+2015-06-18 Carl Hetherington <cth@carlh.net>
+
+ * Stop playback when we reach the end of the film.
+
2015-06-16 c.hetherington <cth@carlh.net>
* Prevent selection of fewer DCP channels than
void
FilmViewer::timer ()
{
- get (_position + DCPTime::from_frames (1, _film->video_frame_rate ()), true);
+ DCPTime const frame = DCPTime::from_frames (1, _film->video_frame_rate ());
+
+ if ((_position + frame) >= _film->length ()) {
+ _play_button->SetValue (false);
+ check_play_state ();
+ } else {
+ get (_position + frame, true);
+ }
+
update_position_label ();
update_position_slider ();
}