mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
qt/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
5bb0e374ce
commit
c64efe494d
1 changed files with 1 additions and 2 deletions
|
@ -152,7 +152,7 @@ shared_render_data_free (struct SharedRenderData * data)
|
|||
delete data->m_context;
|
||||
data->m_context = nullptr;
|
||||
if (data->m_surface)
|
||||
delete data->m_surface;
|
||||
data->m_surface->deleteLater();
|
||||
data->m_surface = nullptr;
|
||||
}
|
||||
|
||||
|
@ -281,7 +281,6 @@ bool CreateSurfaceWorker::event(QEvent * ev)
|
|||
g_mutex_lock (&m_sharedRenderData->lock);
|
||||
m_sharedRenderData->m_surface = new GstBackingSurface;
|
||||
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