mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
omxbufferpool: reference the OMX component
Now that the pool is responsible of freeing the OMX buffers, we need to ensure that the OMX component stay alive while the pool is as we rely on the component to free the buffers. The GstOMXPort is owned by the component so no need to ref this one. https://bugzilla.gnome.org/show_bug.cgi?id=796918
This commit is contained in:
parent
8efa0951ff
commit
86a6703d91
1 changed files with 3 additions and 1 deletions
|
@ -631,6 +631,8 @@ gst_omx_buffer_pool_finalize (GObject * object)
|
|||
gst_caps_unref (pool->caps);
|
||||
pool->caps = NULL;
|
||||
|
||||
g_clear_pointer (&pool->component, gst_omx_component_unref);
|
||||
|
||||
G_OBJECT_CLASS (gst_omx_buffer_pool_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
@ -667,7 +669,7 @@ gst_omx_buffer_pool_new (GstElement * element, GstOMXComponent * component,
|
|||
|
||||
pool = g_object_new (gst_omx_buffer_pool_get_type (), NULL);
|
||||
pool->element = gst_object_ref (element);
|
||||
pool->component = component;
|
||||
pool->component = gst_omx_component_ref (component);
|
||||
pool->port = port;
|
||||
pool->output_mode = output_mode;
|
||||
|
||||
|
|
Loading…
Reference in a new issue