summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/player.cc10
-rw-r--r--src/lib/player.h2
-rw-r--r--src/tools/dcpomatic.cc2
-rw-r--r--src/wx/film_viewer.cc5
4 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index a235d1622..f79265558 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -616,12 +616,14 @@ Player::update_subtitle ()
_out_subtitle.to = _in_subtitle.to + piece->content->position ();
}
-/** Re-emit the last frame that was emitted, using current settings for crop, ratio, scaler and subtitles */
-void
+/** Re-emit the last frame that was emitted, using current settings for crop, ratio, scaler and subtitles.
+ * @return false if this could not be done.
+ */
+bool
Player::repeat_last_video ()
{
if (!_last_process_video.image) {
- return;
+ return false;
}
process_video (
@@ -631,4 +633,6 @@ Player::repeat_last_video ()
_last_process_video.same,
_last_process_video.frame
);
+
+ return true;
}
diff --git a/src/lib/player.h b/src/lib/player.h
index 5604d8e03..7cce7e723 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -59,7 +59,7 @@ public:
void set_video_container_size (libdcp::Size);
- void repeat_last_video ();
+ bool repeat_last_video ();
/** Emitted when a video frame is ready.
* First parameter is the video image.
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index a4e4e8b75..5df513921 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -149,7 +149,7 @@ set_menu_sensitivity ()
++i;
}
bool const dcp_creation = (i != jobs.end ());
- bool const have_dcp = !film->dcps().empty ();
+ bool const have_dcp = film && !film->dcps().empty ();
for (map<wxMenuItem*, int>::iterator j = menu_items.begin(); j != menu_items.end(); ++j) {
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 291ab422d..945644fb1 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -150,7 +150,10 @@ FilmViewer::fetch_current_frame_again ()
*/
_got_frame = false;
- _player->repeat_last_video ();
+ if (!_player->repeat_last_video ()) {
+ fetch_next_frame ();
+ }
+
_panel->Refresh ();
_panel->Update ();
}