mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gstvaapisurface_drm: release image when done
Otherwise intel-vaapi-driver will fail to process the exported surface because it will find it is currently derived, so considered as busy. https://bugzilla.gnome.org/show_bug.cgi?id=755072
This commit is contained in:
parent
910bacc55c
commit
1dbcc8a0e1
1 changed files with 9 additions and 0 deletions
|
@ -36,11 +36,20 @@ gst_vaapi_surface_get_drm_buf_handle (GstVaapiSurface * surface, guint type)
|
||||||
if (!image)
|
if (!image)
|
||||||
goto error_derive_image;
|
goto error_derive_image;
|
||||||
|
|
||||||
|
if (type == GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF)
|
||||||
|
proxy =
|
||||||
|
gst_vaapi_buffer_proxy_new_from_object (GST_VAAPI_OBJECT (surface),
|
||||||
|
image->internal_image.buf, type, NULL, NULL);
|
||||||
|
else
|
||||||
proxy =
|
proxy =
|
||||||
gst_vaapi_buffer_proxy_new_from_object (GST_VAAPI_OBJECT (surface),
|
gst_vaapi_buffer_proxy_new_from_object (GST_VAAPI_OBJECT (surface),
|
||||||
image->internal_image.buf, type, gst_vaapi_object_unref, image);
|
image->internal_image.buf, type, gst_vaapi_object_unref, image);
|
||||||
if (!proxy)
|
if (!proxy)
|
||||||
goto error_alloc_export_buffer;
|
goto error_alloc_export_buffer;
|
||||||
|
|
||||||
|
if (type == GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF)
|
||||||
|
gst_vaapi_object_unref (image);
|
||||||
|
|
||||||
return proxy;
|
return proxy;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
|
Loading…
Reference in a new issue