mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
wpe: free a previous pending image/shm buffer
Don't blindly overwrite a possibly previously set buffer. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1663>
This commit is contained in:
parent
4eeff95f92
commit
b84c8821de
1 changed files with 2 additions and 0 deletions
|
@ -494,6 +494,7 @@ void WPEView::handleExportedImage(gpointer image)
|
||||||
GMutexHolder lock(images_mutex);
|
GMutexHolder lock(images_mutex);
|
||||||
|
|
||||||
GST_TRACE("EGLImage %p wrapped in GstEGLImage %" GST_PTR_FORMAT, eglImage, gstImage);
|
GST_TRACE("EGLImage %p wrapped in GstEGLImage %" GST_PTR_FORMAT, eglImage, gstImage);
|
||||||
|
gst_clear_mini_object ((GstMiniObject **) &egl.pending);
|
||||||
egl.pending = gstImage;
|
egl.pending = gstImage;
|
||||||
|
|
||||||
notifyLoadFinished();
|
notifyLoadFinished();
|
||||||
|
@ -552,6 +553,7 @@ void WPEView::handleExportedBuffer(struct wpe_fdo_shm_exported_buffer* buffer)
|
||||||
{
|
{
|
||||||
GMutexHolder lock(images_mutex);
|
GMutexHolder lock(images_mutex);
|
||||||
GST_TRACE("SHM buffer %p wrapped in buffer %" GST_PTR_FORMAT, buffer, gstBuffer);
|
GST_TRACE("SHM buffer %p wrapped in buffer %" GST_PTR_FORMAT, buffer, gstBuffer);
|
||||||
|
gst_clear_buffer (&shm.pending);
|
||||||
shm.pending = gstBuffer;
|
shm.pending = gstBuffer;
|
||||||
notifyLoadFinished();
|
notifyLoadFinished();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue