X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fvideo_waveform_plot.cc;h=c6fa883fa871c227b321dea92819d126998cd922;hb=605bc8c1952ee1cba6d9f8ff098b5930ab6a9912;hp=9f71140f308345526e5964f9fb96657de120d7fb;hpb=c370a1f38215f6461cf4366e6885757e7aa2b96a;p=dcpomatic.git 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 #include #include @@ -193,7 +194,11 @@ VideoWaveformPlot::set_image (weak_ptr image) } shared_ptr 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 (); }