diff options
author | Matthew Waters <matthew@centricular.com> | 2020-02-06 16:39:06 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2020-02-18 15:52:22 +1100 |
commit | bd31caf0b0d06bf539ab8cdbeb50082dacc2b15d (patch) | |
tree | 1de38539f2b5db41fa0153c0ef8bd7ab1e75883f /gst-libs/gst/vulkan | |
parent | 96a407334d7ce81b6bcca2341e777261e7babf74 (diff) | |
download | gstreamer-plugins-bad-bd31caf0b0d06bf539ab8cdbeb50082dacc2b15d.tar.gz |
vkswapper: keep a reference on the input buffer until present is finished
Otherwise, there may be a very small period of time where the buffer can
be freed while being presented.
Diffstat (limited to 'gst-libs/gst/vulkan')
-rw-r--r-- | gst-libs/gst/vulkan/gstvkswapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gst-libs/gst/vulkan/gstvkswapper.c b/gst-libs/gst/vulkan/gstvkswapper.c index 92198190b..64d688278 100644 --- a/gst-libs/gst/vulkan/gstvkswapper.c +++ b/gst-libs/gst/vulkan/gstvkswapper.c @@ -1338,6 +1338,9 @@ reacquire: gst_vulkan_trash_list_add (priv->trash_list, gst_vulkan_trash_new_free_semaphore (fence, present_semaphore)); + gst_vulkan_trash_list_add (priv->trash_list, + gst_vulkan_trash_new_mini_object_unref (fence, + (GstMiniObject *) gst_buffer_ref (buffer))); gst_vulkan_fence_unref (fence); fence = NULL; } |