diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-01-06 18:55:19 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-01-06 18:55:19 +0000 |
| commit | 3b58fc434bb6933c1429a922fd7f56e70712257a (patch) | |
| tree | 1d9f625e0d9b45273fadda03f62341b2e78321b8 /src | |
| parent | 9272a124c0cac0f9e60f2de132808efffb8b8665 (diff) | |
Fix incorrect video waveform display (#1425).
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/video_waveform_plot.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc index 9f71140f3..c6fa883fa 100644 --- a/src/wx/video_waveform_plot.cc +++ b/src/wx/video_waveform_plot.cc @@ -24,6 +24,7 @@ #include "lib/image.h" #include "lib/film.h" #include "lib/dcp_video.h" +#include "lib/player_video.h" #include <dcp/locale_convert.h> #include <dcp/openjpeg_image.h> #include <wx/rawbmp.h> @@ -193,7 +194,11 @@ VideoWaveformPlot::set_image (weak_ptr<PlayerVideo> image) } shared_ptr<PlayerVideo> pv = image.lock (); - _image = DCPVideo::convert_to_xyz (pv, boost::bind (¬e)); + DCPOMATIC_ASSERT (pv); + /* 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 (pv->shallow_copy(), boost::bind (¬e)); _dirty = true; Refresh (); } |
