mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 12:02:27 +00:00
nlecomposition: Don't leak atomic rc box
* gst_structure_get => increases ref * query_ancestors_position: There are two refs. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7120>
This commit is contained in:
parent
ef53d8c7b7
commit
8435fb4805
1 changed files with 6 additions and 0 deletions
|
@ -1105,6 +1105,8 @@ nle_composition_handle_message (GstBin * bin, GstMessage * message)
|
||||||
}
|
}
|
||||||
g_mutex_unlock (&q->lock);
|
g_mutex_unlock (&q->lock);
|
||||||
|
|
||||||
|
g_atomic_rc_box_release (q);
|
||||||
|
|
||||||
/* We recursed up already */
|
/* We recursed up already */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1906,6 +1908,10 @@ query_ancestors_position (NleComposition * comp)
|
||||||
res = get_current_position (comp);
|
res = get_current_position (comp);
|
||||||
}
|
}
|
||||||
g_mutex_unlock (&q->lock);
|
g_mutex_unlock (&q->lock);
|
||||||
|
|
||||||
|
/* Double release. One for the creation. One for the extra we gave to the
|
||||||
|
* structure */
|
||||||
|
g_atomic_rc_box_release (q);
|
||||||
g_atomic_rc_box_release (q);
|
g_atomic_rc_box_release (q);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in a new issue