summaryrefslogtreecommitdiff
path: root/src/wx/video_waveform_plot.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-08-04 23:55:17 +0200
committerCarl Hetherington <cth@carlh.net>2022-08-04 23:55:17 +0200
commit7bd8eecb8ba8535978d58408dc73ce7528034c7e (patch)
treee3019a153415a6becde846fcb6a68f0674341bc1 /src/wx/video_waveform_plot.cc
parentd6aeaf8dd1b3158689da7b75c7417c1838af9c95 (diff)
wip: got stuck... because PlayerVideo is related to the render sizeadjust-sizing
because its subtitles are prepared for the _video_container_size that the Player knows about. I think the only way around this would be to store the subs in PlayerVideo in some independent way and to scale/convert to bitmap later.
Diffstat (limited to 'src/wx/video_waveform_plot.cc')
-rw-r--r--src/wx/video_waveform_plot.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc
index 8e3284682..6ec173469 100644
--- a/src/wx/video_waveform_plot.cc
+++ b/src/wx/video_waveform_plot.cc
@@ -195,10 +195,15 @@ VideoWaveformPlot::set_image (shared_ptr<PlayerVideo> image)
return;
}
+ auto film = _film.lock ();
+ if (!film) {
+ return;
+ }
+
/* We must copy the PlayerVideo here as we will call ::image() on it, potentially
with a different pixel_format than was used when ::prepare() was called.
*/
- _image = DCPVideo::convert_to_xyz (image->shallow_copy(), [](dcp::NoteType, string) {});
+ _image = DCPVideo::convert_to_xyz(image->shallow_copy(), film->frame_size(), [](dcp::NoteType, string) {});
_dirty = true;
Refresh ();
}