+VideoWidget::~VideoWidget()
+{
+ stop();
+
+ // Qt will delete video_window for us after we're gone,
+ // so make sure its destructor does not try to mess with
+ // our freelist. The actual freelist frames will leak.
+ video_window->set_current_frame(nullptr);
+}
+