summaryrefslogtreecommitdiff
path: root/src/wx/gl_video_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-05-10 01:32:58 +0100
committerCarl Hetherington <cth@carlh.net>2019-05-10 23:43:55 +0100
commit24524e414e850106861dc2b288131d904e0dc04f (patch)
treebc737a5d236c6c4b8696ae1302f9a9072d59e519 /src/wx/gl_video_view.cc
parentfc4f75abd3b062e8297990a482e77e32458cd169 (diff)
Remove storage of _frame in FilmViewer.
Diffstat (limited to 'src/wx/gl_video_view.cc')
-rw-r--r--src/wx/gl_video_view.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc
index d1e7c7326..0f0118e00 100644
--- a/src/wx/gl_video_view.cc
+++ b/src/wx/gl_video_view.cc
@@ -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());