Remove storage of _frame in FilmViewer.
[dcpomatic.git] / src / wx / gl_video_view.cc
index d1e7c7326e3d43a90554f28eb61163639e17ee29..0f0118e00fde0699007c82431255006216a5d82a 100644 (file)
@@ -35,6 +35,7 @@
 
 using std::cout;
 using boost::shared_ptr;
+using boost::optional;
 
 GLVideoView::GLVideoView (wxWindow *parent)
 {
@@ -117,6 +118,11 @@ GLVideoView::paint (wxPaintEvent &)
 void
 GLVideoView::set_image (shared_ptr<const Image> image)
 {
+       if (!image) {
+               _size = optional<dcp::Size>();
+               return;
+       }
+
        DCPOMATIC_ASSERT (image->pixel_format() == AV_PIX_FMT_RGB24);
        DCPOMATIC_ASSERT (!image->aligned());