Supporter.
[dcpomatic.git] / src / wx / film_viewer.cc
index 7ecba1903799d28ae658a7eee917bbce6d624983..de12564d7756b61730b5ad5f9a54d90f529fbbeb 100644 (file)
@@ -50,6 +50,7 @@ using std::cout;
 using std::list;
 using std::bad_alloc;
 using std::make_pair;
+using std::exception;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 using boost::weak_ptr;
@@ -169,10 +170,16 @@ FilmViewer::get (DCPTime p, bool accurate)
                return;
        }
 
-       list<shared_ptr<PlayerVideo> > pvf = _player->get_video (p, accurate);
+       list<shared_ptr<PlayerVideo> > pvf;
+       try {
+               pvf = _player->get_video (p, accurate);
+       } catch (exception& e) {
+               error_dialog (this, wxString::Format (_("Could not get video for view (%s)"), std_to_wx(e.what()).data()));
+       }
+       
        if (!pvf.empty ()) {
                try {
-                       _frame = pvf.front()->image (true);
+                       _frame = pvf.front()->image (PIX_FMT_RGB24, true);
                        _frame = _frame->scale (_frame->size(), Scaler::from_id ("fastbilinear"), PIX_FMT_RGB24, false);
                        _position = pvf.front()->time ();
                        _inter_position = pvf.front()->inter_position ();