X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fplayer_video.cc;h=e36eb1984438add8e0ca4ac98f4d4daf7276b1dd;hp=6c0cf20c1f807b0c3b5fafcc2ff79b6d1874ee55;hb=f0c10e92b849566e458bc323f8783a6fe83e52d2;hpb=254b3044d72de6b033d7c584f5abd2b9aa70aad5 diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc index 6c0cf20c1..e36eb1984 100644 --- a/src/lib/player_video.cc +++ b/src/lib/player_video.cc @@ -105,10 +105,10 @@ PlayerVideo::set_text (PositionImage image) shared_ptr PlayerVideo::image (function pixel_format, bool aligned, bool fast) const { - /* XXX: this assumes that image() and prepare() are only ever called with the same parameters */ + /* XXX: this assumes that image() and prepare() are only ever called with the same parameters (except crop, inter size, out size, fade) */ boost::mutex::scoped_lock lm (_mutex); - if (!_image) { + if (!_image || _crop != _image_crop || _inter_size != _image_inter_size || _out_size != _image_out_size || _fade != _image_fade) { make_image (pixel_format, aligned, fast); } return _image; @@ -124,6 +124,11 @@ PlayerVideo::image (function pixel_format, bool a void PlayerVideo::make_image (function pixel_format, bool aligned, bool fast) const { + _image_crop = _crop; + _image_inter_size = _inter_size; + _image_out_size = _out_size; + _image_fade = _fade; + pair, int> prox = _in->image (_inter_size); shared_ptr im = prox.first; int const reduce = prox.second; @@ -239,7 +244,7 @@ bool PlayerVideo::same (shared_ptr other) const { if (_crop != other->_crop || - _fade.get_value_or(0) != other->_fade.get_value_or(0) || + _fade != other->_fade || _inter_size != other->_inter_size || _out_size != other->_out_size || _eyes != other->_eyes ||