diff --git a/gst-libs/gst/vaapi/gstvaapibufferproxy.c b/gst-libs/gst/vaapi/gstvaapibufferproxy.c index a9b3485806..75cbe9296d 100644 --- a/gst-libs/gst/vaapi/gstvaapibufferproxy.c +++ b/gst-libs/gst/vaapi/gstvaapibufferproxy.c @@ -336,3 +336,22 @@ gst_vaapi_buffer_proxy_get_size (GstVaapiBufferProxy * proxy) return 0; #endif } + +/** + * gst_vaapi_buffer_proxy_release_data: + * @proxy: a #GstVaapiBufferProxy + * + * Notifies the user to destroy the user's data, though the @proxy is + * not going to be destroyed. + **/ +void +gst_vaapi_buffer_proxy_release_data (GstVaapiBufferProxy * proxy) +{ + g_return_if_fail (proxy != NULL); + + if (proxy->destroy_func) { + proxy->destroy_func (proxy->destroy_data); + proxy->destroy_func = NULL; + proxy->destroy_data = NULL; + } +} diff --git a/gst-libs/gst/vaapi/gstvaapibufferproxy.h b/gst-libs/gst/vaapi/gstvaapibufferproxy.h index a70d33f419..7d611cf3f8 100644 --- a/gst-libs/gst/vaapi/gstvaapibufferproxy.h +++ b/gst-libs/gst/vaapi/gstvaapibufferproxy.h @@ -92,6 +92,9 @@ gst_vaapi_buffer_proxy_get_handle (GstVaapiBufferProxy * proxy); gsize gst_vaapi_buffer_proxy_get_size (GstVaapiBufferProxy * proxy); +void +gst_vaapi_buffer_proxy_release_data (GstVaapiBufferProxy * proxy); + G_END_DECLS #endif /* GST_VAAPI_BUFFER_PROXY_H */