urisourcebin: Avoid races when setting up typefind
authorEdward Hervey <edward@centricular.com>
Thu, 12 Jan 2017 09:51:34 +0000 (10:51 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 12 Jan 2017 09:51:34 +0000 (10:51 +0100)
commit90e86b86385c89aaec4dcfd149203375cf2d313e
tree54eed1de79ba9d82927495355b76d048404497a9
parentd0c1b34288b4bbbc7bce69afcc4e31d80e2dfc13
urisourcebin: Avoid races when setting up typefind

The state of urisourcebin (and all elements contained within) can
change at any point in time, including when setting up the typefind
element.

In order to avoid ending up with typefind starting without being fully
connected, lock the state and connect to the 'have-type' signal.
gst/playback/gsturisourcebin.c