wpe: Run frameComplete outside of images mutex scope
If the mutex is locked while running frameComplete there is a potential deadlock bound to happen when we get a new exported images from the backend. Fixes #1101
This commit is contained in:
parent
5a9541caff
commit
0f03e33b03
@ -270,6 +270,8 @@ bool WPEThreadedView::initialize(GstWpeSrc* src, GstGLContext* context, GstGLDis
|
|||||||
GstEGLImage* WPEThreadedView::image()
|
GstEGLImage* WPEThreadedView::image()
|
||||||
{
|
{
|
||||||
GstEGLImage* ret = nullptr;
|
GstEGLImage* ret = nullptr;
|
||||||
|
|
||||||
|
{
|
||||||
GMutexHolder lock(images.mutex);
|
GMutexHolder lock(images.mutex);
|
||||||
|
|
||||||
GST_TRACE("pending %" GST_PTR_FORMAT " (%d) committed %" GST_PTR_FORMAT " (%d)", images.pending,
|
GST_TRACE("pending %" GST_PTR_FORMAT " (%d) committed %" GST_PTR_FORMAT " (%d)", images.pending,
|
||||||
@ -286,11 +288,13 @@ GstEGLImage* WPEThreadedView::image()
|
|||||||
gst_egl_image_unref(previousImage);
|
gst_egl_image_unref(previousImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (images.committed) {
|
if (images.committed)
|
||||||
ret = images.committed;
|
ret = images.committed;
|
||||||
frameComplete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
frameComplete();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user