summaryrefslogtreecommitdiff
path: root/src/wx/video_waveform_plot.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-04-13 21:09:37 +0200
committerCarl Hetherington <cth@carlh.net>2025-04-13 21:09:37 +0200
commitd16267be986c0994f05fc6a3889b83ba53a230b0 (patch)
tree8f416cd12b06f2a334023c891bb78bd0996bb518 /src/wx/video_waveform_plot.h
parentc325ab5f745c67e6381bcee582bf809018d809e0 (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/video_waveform_plot.h')
-rw-r--r--src/wx/video_waveform_plot.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wx/video_waveform_plot.h b/src/wx/video_waveform_plot.h
index f482da8f8..e6e7a6f3d 100644
--- a/src/wx/video_waveform_plot.h
+++ b/src/wx/video_waveform_plot.h
@@ -56,7 +56,7 @@ private:
void paint ();
void sized (wxSizeEvent &);
void create_waveform ();
- void set_image (std::shared_ptr<PlayerVideo>);
+ void set_image();
void mouse_moved (wxMouseEvent &);
std::weak_ptr<const Film> _film;
@@ -67,6 +67,8 @@ private:
int _component = 0;
int _contrast = 0;
+ FilmViewer& _viewer;
+
static int const _vertical_margin;
static int const _pixel_values;
static int const _x_axis_width;