mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
basetransform: Avoid increasing query reference
gst_query_find_allocation_meta() requires the query to be writable to work. This patch ensure avoids taking a reference on the query, so we can now check if a certain allocation meta is present. https://bugzilla.gnome.org/show_bug.cgi?id=752661
This commit is contained in:
parent
0a50d1be52
commit
f9aa306747
1 changed files with 14 additions and 4 deletions
|
@ -1503,8 +1503,10 @@ gst_base_transform_default_query (GstBaseTransform * trans,
|
|||
GST_OBJECT_UNLOCK (trans);
|
||||
goto done;
|
||||
}
|
||||
if ((decide_query = trans->priv->query))
|
||||
gst_query_ref (decide_query);
|
||||
|
||||
decide_query = trans->priv->query;
|
||||
trans->priv->query = NULL;
|
||||
|
||||
GST_OBJECT_UNLOCK (trans);
|
||||
|
||||
GST_DEBUG_OBJECT (trans,
|
||||
|
@ -1517,8 +1519,16 @@ gst_base_transform_default_query (GstBaseTransform * trans,
|
|||
else
|
||||
ret = FALSE;
|
||||
|
||||
if (decide_query)
|
||||
gst_query_unref (decide_query);
|
||||
if (decide_query) {
|
||||
GST_OBJECT_LOCK (trans);
|
||||
|
||||
if (trans->priv->query == NULL)
|
||||
trans->priv->query = decide_query;
|
||||
else
|
||||
gst_query_unref (decide_query);
|
||||
|
||||
GST_OBJECT_UNLOCK (trans);
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (trans, "ALLOCATION ret %d, %" GST_PTR_FORMAT, ret,
|
||||
query);
|
||||
|
|
Loading…
Reference in a new issue