summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-04-21 11:36:04 +0100
committerCarl Hetherington <cth@carlh.net>2017-04-21 11:36:04 +0100
commit671ca74d521e101f83f45a0b1492602e607b6ad3 (patch)
tree0c0b8a85885950869e2ea6e1688e25d1fce099e8 /src
parent0e12f00a1807c5ad27814ad3ad8a72ec2261900e (diff)
Throw exceptions raised while waiting for the butler to deliver video.
Diffstat (limited to 'src')
-rw-r--r--src/lib/butler.cc2
-rw-r--r--src/wx/film_viewer.cc4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/butler.cc b/src/lib/butler.cc
index 32d607c5d..b84dbc024 100644
--- a/src/lib/butler.cc
+++ b/src/lib/butler.cc
@@ -107,6 +107,8 @@ try
/* The butler thread is being terminated */
} catch (...) {
store_current ();
+ _finished = true;
+ _arrived.notify_all ();
}
pair<shared_ptr<PlayerVideo>, DCPTime>
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 37f999632..a0cc25ab9 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -258,6 +258,8 @@ FilmViewer::refresh_panel ()
void
FilmViewer::get ()
{
+ DCPOMATIC_ASSERT (_butler);
+
pair<shared_ptr<PlayerVideo>, DCPTime> video;
do {
video = _butler->get_video ();
@@ -266,6 +268,8 @@ FilmViewer::get ()
((_left_eye->GetValue() && video.first->eyes() == EYES_RIGHT) || (_right_eye->GetValue() && video.first->eyes() == EYES_LEFT))
);
+ _butler->rethrow ();
+
if (!video.first) {
_frame.reset ();
refresh_panel ();