wip: got stuck... because PlayerVideo is related to the render size
[dcpomatic.git] / src / wx / video_waveform_plot.cc
index 8e3284682485833dc7395c65b75e1c1edeb3be14..6ec1734690e7b503186bc2a0e4b6b72e6f9d4432 100644 (file)
@@ -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 ();
 }