mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
vaapivideomemory: release proxy's data if downstream
The surface created for downstream is going to be filled by VAAPI elements. So, the driver needs write access on that surface. This patch releases the derived image held by the proxy, thus the surface is unmarked as busy. This is how it has to be done as discussed on libva mailing list. https://bugzilla.gnome.org/show_bug.cgi?id=755072
This commit is contained in:
parent
69a2406a20
commit
33af1fc578
1 changed files with 8 additions and 0 deletions
|
@ -992,6 +992,14 @@ gst_vaapi_dmabuf_memory_new (GstAllocator * base_allocator,
|
|||
gst_mini_object_set_qdata (GST_MINI_OBJECT_CAST (mem),
|
||||
GST_VAAPI_BUFFER_PROXY_QUARK, dmabuf_proxy,
|
||||
(GDestroyNotify) gst_vaapi_buffer_proxy_unref);
|
||||
|
||||
/* When a VA surface is going to be filled by a VAAPI element
|
||||
* (decoder or VPP), it has _not_ be marked as busy in the driver.
|
||||
* Releasing the surface's derived image, held by the buffer proxy,
|
||||
* the surface will be unmarked as busy. */
|
||||
if (allocator->direction == GST_PAD_SRC)
|
||||
gst_vaapi_buffer_proxy_release_data (dmabuf_proxy);
|
||||
|
||||
return mem;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
Loading…
Reference in a new issue