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;
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 ();