mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +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;
|
delete data->m_context;
|
||||||
data->m_context = nullptr;
|
data->m_context = nullptr;
|
||||||
if (data->m_surface)
|
if (data->m_surface)
|
||||||
delete data->m_surface;
|
data->m_surface->deleteLater();
|
||||||
data->m_surface = nullptr;
|
data->m_surface = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +281,6 @@ bool CreateSurfaceWorker::event(QEvent * ev)
|
||||||
g_mutex_lock (&m_sharedRenderData->lock);
|
g_mutex_lock (&m_sharedRenderData->lock);
|
||||||
m_sharedRenderData->m_surface = new GstBackingSurface;
|
m_sharedRenderData->m_surface = new GstBackingSurface;
|
||||||
m_sharedRenderData->m_surface->create();
|
m_sharedRenderData->m_surface->create();
|
||||||
m_sharedRenderData->m_surface->moveToThread (m_sharedRenderData->m_renderThread);
|
|
||||||
GST_TRACE ("%p created surface %p", m_sharedRenderData,
|
GST_TRACE ("%p created surface %p", m_sharedRenderData,
|
||||||
m_sharedRenderData->m_surface);
|
m_sharedRenderData->m_surface);
|
||||||
g_cond_broadcast (&m_sharedRenderData->cond);
|
g_cond_broadcast (&m_sharedRenderData->cond);
|
||||||
|
|
Loading…
Reference in a new issue