FilmViewer::slider_moved ()
{
if (_film && _player) {
- _player->seek (_slider->GetValue() * _film->length() / 4096, false);
- fetch_next_frame ();
+ try {
+ _player->seek (_slider->GetValue() * _film->length() / 4096, false);
+ fetch_next_frame ();
+ } catch (OpenFileError& e) {
+ /* There was a problem opening a content file; we'll let this slide as it
+ probably means a missing content file, which we're already taking care of.
+ */
+ }
}
}
_out_size.width = max (64, _out_size.width);
_out_size.height = max (64, _out_size.height);
+ /* The player will round its image down to the nearest 4 pixels
+ to speed up its scale, so do similar here to avoid black borders
+ around things. This is a bit of a hack.
+ */
+ _out_size.width &= ~3;
+ _out_size.height &= ~3;
+
_player->set_video_container_size (_out_size);
}
p = 0;
}
- _player->seek (p, true);
- fetch_next_frame ();
+ try {
+ _player->seek (p, true);
+ fetch_next_frame ();
+ } catch (OpenFileError& e) {
+ /* There was a problem opening a content file; we'll let this slide as it
+ probably means a missing content file, which we're already taking care of.
+ */
+ }
}
void