projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.
[dcpomatic.git]
/
src
/
wx
/
film_viewer.cc
diff --git
a/src/wx/film_viewer.cc
b/src/wx/film_viewer.cc
index f426a7c6e9f86c77764b6274586abcb2760655d1..b0bc65750f71ea8e202d973a07792a858c814c13 100644
(file)
--- a/
src/wx/film_viewer.cc
+++ b/
src/wx/film_viewer.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012
-2014
Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-222,6
+222,11
@@
FilmViewer::slider_moved ()
{
if (_film && _player) {
try {
{
if (_film && _player) {
try {
+ Time t = _slider->GetValue() * _film->length() / 4096;
+ /* Ensure that we hit the end of the film at the end of the slider */
+ if (t >= _film->length ()) {
+ t = _film->length() - _film->video_frames_to_time (1);
+ }
_player->seek (DCPTime (_film->length().get() * _slider->GetValue() / 4096), false);
fetch_next_frame ();
} catch (OpenFileError& e) {
_player->seek (DCPTime (_film->length().get() * _slider->GetValue() / 4096), false);
fetch_next_frame ();
} catch (OpenFileError& e) {
@@
-429,7
+434,7
@@
FilmViewer::player_changed (bool frequent)
if (frequent) {
return;
}
if (frequent) {
return;
}
-
+
calculate_sizes ();
fetch_current_frame_again ();
}
calculate_sizes ();
fetch_current_frame_again ();
}