Commit b7988b4d authored by Víctor Manuel Jáquez Leal's avatar Víctor Manuel Jáquez Leal Committed by GStreamer Merge Bot

va: filter: destroy pipeline buffer after destroying filters

In 6ae24948 the pipeline buffer destroy were removing assuming it
wasn't required. Nonetheless, debugging the code it looks like a
buffer leak in iHD driver since the ID of the buffer kept increasing.

The difference now is that first the filter buffers are destroy first
and later the pipeline buffer.

Part-of: <!2023>
parent 2e9a0962
......@@ -906,7 +906,7 @@ _destroy_filters_unlocked (GstVaFilter * self)
gboolean ret = TRUE;
guint i;
GST_TRACE_OBJECT (self, "Destroy filter buffers");
GST_TRACE_OBJECT (self, "Destroying %u filter buffers", self->filters->len);
dpy = gst_va_display_get_va_dpy (self->display);
......@@ -1005,6 +1005,9 @@ _create_pipeline_buffer (GstVaFilter * self, VASurfaceID surface,
return FALSE;
GST_TRACE_OBJECT (self, "Created VABufferID %#x with %u filters", *buffer,
return TRUE;
......@@ -1099,6 +1102,14 @@ bail:
g_array_unref (self->filters);
_destroy_filters_unlocked (self);
gst_va_display_lock (self->display);
status = vaDestroyBuffer (dpy, buffer);
gst_va_display_unlock (self->display);
if (status != VA_STATUS_SUCCESS) {
GST_WARNING_OBJECT (self, "Failed to destroy pipeline buffer: %s",
vaErrorStr (status));
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment