connect(video_window, &VideoWindow::mouse_moved, this, &VideoWidget::mouseMoveEvent);
}
+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);
+}
+
GLuint compile_shader(const string &shader_src, GLenum type)
{
GLuint obj = glCreateShader(type);
public:
VideoWidget(QWidget *parent);
- ~VideoWidget() { stop(); }
+ ~VideoWidget();
bool open(const std::string &filename); // False on error.
void play();