mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
Revert "gstvaapisurface_drm: release image when done"
This reverts commit1dbcc8a0e1
and commit372a03a9e3
. While the dmabuf handle is exported, the derive image must exist, otherwise the image's VA buffer is invalid, thus the dmabuf handle is never released, leading into a file descriptors leak.
This commit is contained in:
parent
3efc2f70b7
commit
7472826a36
1 changed files with 3 additions and 11 deletions
|
@ -36,19 +36,11 @@ gst_vaapi_surface_get_drm_buf_handle (GstVaapiSurface * surface, guint type)
|
|||
if (!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 = gst_vaapi_buffer_proxy_new_from_object (GST_VAAPI_OBJECT (surface),
|
||||
image->internal_image.buf, type, gst_vaapi_object_unref, image);
|
||||
}
|
||||
proxy =
|
||||
gst_vaapi_buffer_proxy_new_from_object (GST_VAAPI_OBJECT (surface),
|
||||
image->internal_image.buf, type, gst_vaapi_object_unref, image);
|
||||
if (!proxy)
|
||||
goto error_alloc_export_buffer;
|
||||
|
||||
if (type == GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF)
|
||||
gst_vaapi_object_unref (image);
|
||||
|
||||
return proxy;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
Loading…
Reference in a new issue