Skip to content

screen-cast-stream-src: Don't leak GSource

For every stream src, we created and attached a GSource. Upon stream src destruction, we g_source_destroy():ed the GSource. What g_source_destroy() does, hawever, is not really "destroy" it but only detaches it from the main context remoing the reference the context had added for it via g_source_attach(). This caused the GSource to leak, although in a detached state, as the reference created on creation was still held.

Fix this by also removing our own reference to it when finalizing.

Merge request reports