diff --git a/subprojects/gst-plugins-good/ext/qt6/qt6glrenderer.cc b/subprojects/gst-plugins-good/ext/qt6/qt6glrenderer.cc index 7fa7afbd3d..089c9c005b 100644 --- a/subprojects/gst-plugins-good/ext/qt6/qt6glrenderer.cc +++ b/subprojects/gst-plugins-good/ext/qt6/qt6glrenderer.cc @@ -156,7 +156,7 @@ shared_render_data_free (struct SharedRenderData * data) } data->m_context = nullptr; if (data->m_surface) - delete data->m_surface; + data->m_surface->deleteLater(); data->m_surface = nullptr; } @@ -268,7 +268,6 @@ bool CreateSurfaceWorker::event(QEvent * ev) g_mutex_lock (&m_sharedRenderData->lock); m_sharedRenderData->m_surface = new GstQt6BackingSurface; m_sharedRenderData->m_surface->create(); - m_sharedRenderData->m_surface->moveToThread (m_sharedRenderData->m_renderThread); GST_TRACE ("%p created surface %p", m_sharedRenderData, m_sharedRenderData->m_surface); g_cond_broadcast (&m_sharedRenderData->cond);