mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
This commit is contained in:
parent
2e9a096282
commit
b7988b4de8
1 changed files with 12 additions and 1 deletions
|
@ -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,
|
||||
num_filters);
|
||||
|
||||
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));
|
||||
}
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue