mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
qt6/glrenderer: don't attempt to use QWindow from non-Qt main thread
Use QObject::deleteLater() to schedule deletion in the main thread. Remove the moveToThread of the QWindow. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4728>
This commit is contained in:
parent
c64efe494d
commit
74f914077d
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue