X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fvideo_waveform_plot.cc;h=f6fa939403e2f00257ece606886635c85ce7e8d7;hb=7a301e22de2a3c47a81ebc4c9f19b68131b482aa;hp=8e3284682485833dc7395c65b75e1c1edeb3be14;hpb=3c29aa6531a4046a8db72dcac81189eb8893233c;p=dcpomatic.git diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc index 8e3284682..f6fa93940 100644 --- a/src/wx/video_waveform_plot.cc +++ b/src/wx/video_waveform_plot.cc @@ -53,7 +53,7 @@ int const VideoWaveformPlot::_pixel_values = 4096; int const VideoWaveformPlot::_x_axis_width = 52; -VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr film, weak_ptr viewer) +VideoWaveformPlot::VideoWaveformPlot(wxWindow* parent, weak_ptr film, FilmViewer& viewer) : wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE) , _film (film) { @@ -61,10 +61,7 @@ VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr fil SetDoubleBuffered (true); #endif - auto fv = viewer.lock (); - DCPOMATIC_ASSERT (fv); - - _viewer_connection = fv->ImageChanged.connect (boost::bind(&VideoWaveformPlot::set_image, this, _1)); + _viewer_connection = viewer.ImageChanged.connect(boost::bind(&VideoWaveformPlot::set_image, this, _1)); Bind (wxEVT_PAINT, boost::bind(&VideoWaveformPlot::paint, this)); Bind (wxEVT_SIZE, boost::bind(&VideoWaveformPlot::sized, this, _1)); @@ -198,7 +195,7 @@ VideoWaveformPlot::set_image (shared_ptr image) /* 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()); _dirty = true; Refresh (); }