Skip to content

uri-asset: Ensure that the discoverer stops on deinit.

Discoverer maintain a referernce on the discoverer object while the async timeout callback is alive to prevent a potential crash if the object is freed while the callback is pending. (See also: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/blob/master/gst-libs/gst/pbutils/gstdiscoverer.c#L1562)

But if g_main_context is released before calling the timeout callback, the discoverer pointer which was weak referenced from GESUriClipAssetClass will not be disposed because the discoverer object is not finalized.

So we should be explicitly call gst_discoverer_stop() to finalize the discoverer when performing ges_deinit().

Edited by Yeongjin Jeong

Merge request reports