diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-11-27 23:24:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-11-27 23:24:33 +0000 |
| commit | 51bdd082283e39ebeca5150995d98cdade189fe1 (patch) | |
| tree | cd727d71e44e50ff98ed306926b295d8422a2325 /src/lib/player_video.cc | |
| parent | b8f0865d6a5d182dc4c718b9320c82091864e55b (diff) | |
Fix non-updating crop settings (#1421).
Diffstat (limited to 'src/lib/player_video.cc')
| -rw-r--r-- | src/lib/player_video.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc index 6c0cf20c1..1df8fb3e8 100644 --- a/src/lib/player_video.cc +++ b/src/lib/player_video.cc @@ -105,10 +105,10 @@ PlayerVideo::set_text (PositionImage image) shared_ptr<Image> PlayerVideo::image (function<AVPixelFormat (AVPixelFormat)> 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) */ boost::mutex::scoped_lock lm (_mutex); - if (!_image) { + if (!_image || _crop != _image_crop) { make_image (pixel_format, aligned, fast); } return _image; @@ -124,6 +124,8 @@ PlayerVideo::image (function<AVPixelFormat (AVPixelFormat)> pixel_format, bool a void PlayerVideo::make_image (function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const { + _image_crop = _crop; + pair<shared_ptr<Image>, int> prox = _in->image (_inter_size); shared_ptr<Image> im = prox.first; int const reduce = prox.second; |
