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/7116>
This commit is contained in:
Edward Hervey 2024-06-29 09:52:42 +02:00 committed by GStreamer Marge Bot
parent 8addeae87b
commit 43bf898f2d

View file

@ -1105,6 +1105,8 @@ nle_composition_handle_message (GstBin * bin, GstMessage * message)
}
g_mutex_unlock (&q->lock);
g_atomic_rc_box_release (q);
/* We recursed up already */
return;
}
@ -1906,6 +1908,10 @@ query_ancestors_position (NleComposition * comp)
res = get_current_position (comp);
}
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);
return res;