diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-04-13 21:09:37 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-04-13 21:09:37 +0200 |
| commit | d16267be986c0994f05fc6a3889b83ba53a230b0 (patch) | |
| tree | 8f416cd12b06f2a334023c891bb78bd0996bb518 /src/wx/film_viewer.cc | |
| parent | c325ab5f745c67e6381bcee582bf809018d809e0 (diff) | |
Don't bind a shared_ptr<PlayerVideo> to ImageChanged (#3013).
Otherwise if the GUI is busy when the emissions build up, each one holds
a reference to a potentially large image.
This caused enormous memory use when playing a DCP and verifying it at
the same time.
Diffstat (limited to 'src/wx/film_viewer.cc')
| -rw-r--r-- | src/wx/film_viewer.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 957407338..0efa75380 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -864,7 +864,15 @@ FilmViewer::gets () const void FilmViewer::image_changed (shared_ptr<PlayerVideo> pv) { - emit (boost::bind(boost::ref(ImageChanged), pv)); + _last_image = pv; + emit(boost::bind(boost::ref(ImageChanged))); +} + + +shared_ptr<const PlayerVideo> +FilmViewer::last_image() const +{ + return _last_image; } |
