Move _dropped into VideoView.
[dcpomatic.git] / src / wx / simple_video_view.cc
index 7aeb317b281a4fb6811f45fa70db0de6989d182c..33e2834c5bba8820855d3eeba336455c87dbae4c 100644 (file)
@@ -169,6 +169,7 @@ SimpleVideoView::timer ()
 void
 SimpleVideoView::start ()
 {
+       VideoView::start ();
        timer ();
 }
 
@@ -194,6 +195,12 @@ SimpleVideoView::display_next_frame (bool non_blocking)
 
        display_player_video ();
 
+       try {
+               _viewer->butler()->rethrow ();
+       } catch (DecodeError& e) {
+               error_dialog (get(), e.what());
+       }
+
        return true;
 }
 
@@ -210,7 +217,7 @@ SimpleVideoView::display_player_video ()
                /* Too late; just drop this frame before we try to get its image (which will be the time-consuming
                   part if this frame is J2K).
                */
-               ++_viewer->_dropped;
+               add_dropped ();
                return;
        }