Instead of using g_array_free which is not thread safe use g_array_unref instead Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1203>