v4l2: device provider: Fix GMainLoop leak
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 1 May 2023 18:01:02 +0000 (14:01 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 9 May 2023 09:24:40 +0000 (09:24 +0000)
commit00e4ad2c396567352dfe361d747c91e43eae9b83
treea6b5e374cc6c21c122ffb3e2e0705b8d4f0f1ca5
parent268ce06c78571afdaf95671c9a455f24f469bf4b
v4l2: device provider: Fix GMainLoop leak

On very quick start/stop, the mainloop may never be run. As a side
effect, our idle stop function is not really being ran, so we can't rely
on that to free the main loop. Simply unref the mainloop when the
thread have completely stop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4539>
subprojects/gst-plugins-good/sys/v4l2/gstv4l2deviceprovider.c