Throw exceptions raised while waiting for the butler to deliver video.
authorCarl Hetherington <cth@carlh.net>
Fri, 21 Apr 2017 10:36:04 +0000 (11:36 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 21 Apr 2017 10:36:04 +0000 (11:36 +0100)
src/lib/butler.cc
src/wx/film_viewer.cc

index 32d607c5d22c080477889cbb4646776cefe845f4..b84dbc024d65d68592373aef2137b8a5bdf08964 100644 (file)
@@ -107,6 +107,8 @@ try
        /* The butler thread is being terminated */
 } catch (...) {
        store_current ();
+       _finished = true;
+       _arrived.notify_all ();
 }
 
 pair<shared_ptr<PlayerVideo>, DCPTime>
index 37f9996329aa2611ea0d4df98fa1d71508ffaf72..a0cc25ab9f7791943aceacd571104485eae67906 100644 (file)
@@ -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 ();