diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-08-19 23:27:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-08-19 23:27:43 +0100 |
| commit | 3330f33acc407c0f657549472c3efc04cb2fe533 (patch) | |
| tree | f0e96c71b037631bfea09c2111643044919aab87 | |
| parent | 37771e9ec22cf1d9ef6a5c2a9c9c59b3e6278431 (diff) | |
Fix crash when setting player decode resolution with no loaded DCP (#1115).
| -rw-r--r-- | src/wx/film_viewer.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 505245927..9493a55c9 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -197,6 +197,9 @@ FilmViewer::set_film (shared_ptr<Film> film) try { _player.reset (new Player (_film, _film->playlist ())); _player->set_fast (); + if (_dcp_decode_reduction) { + _player->set_dcp_decode_reduction (_dcp_decode_reduction); + } } catch (bad_alloc) { error_dialog (this, _("There is not enough free memory to do that.")); _film.reset (); @@ -811,7 +814,10 @@ FilmViewer::average_latency () const void FilmViewer::set_dcp_decode_reduction (optional<int> reduction) { - _player->set_dcp_decode_reduction (reduction); + _dcp_decode_reduction = reduction; + if (_player) { + _player->set_dcp_decode_reduction (reduction); + } } DCPTime |
