parsebin: Don't let thread run after unref
authorEdward Hervey <edward@centricular.com>
Fri, 10 Nov 2017 13:54:12 +0000 (14:54 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 10 Nov 2017 16:06:45 +0000 (17:06 +0100)
commit35a8d42724d5f9753fc18a7d27a7bf16993eed78
tree314478ac4366384eecee93441daf72778e154c29
parent43b9bcbddb6599fe05c1fafa3105412fedd07d23
parsebin: Don't let thread run after unref

We have a dedicated one-shot thread to handle cleanup of old groups.

While this is a good idea. It's an even better idea to make sure
that thread is *completed* before the parsebin element to which
it is related isn't freed/gone.

* There can only be one cleanup thread happening at any point in time.
  If there is already one, we wait for the previous one to finish.
* When shutting down (NULL=>READY) make sure the thread is finished

https://bugzilla.gnome.org/show_bug.cgi?id=790007
gst/playback/gstparsebin.c