diff options
Diffstat (limited to 'src/wx/film_viewer.cc')
| -rw-r--r-- | src/wx/film_viewer.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 1fa7bdb91..d00a582e5 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -164,8 +164,10 @@ FilmViewer::timer (wxTimerEvent &) fetch_next_frame (); - if (_film->length()) { - int const new_slider_position = 4096 * _player->video_position() / _film->length(); + Time const len = _film->length_with_loop (); + + if (len) { + int const new_slider_position = 4096 * _player->video_position() / len; if (new_slider_position != _slider->GetValue()) { _slider->SetValue (new_slider_position); } @@ -211,7 +213,7 @@ void FilmViewer::slider_moved (wxScrollEvent &) { if (_film && _player) { - _player->seek (_slider->GetValue() * _film->length() / 4096, false); + _player->seek (_slider->GetValue() * _film->length_with_loop() / 4096, false); fetch_next_frame (); } } |
