decodebin2: Don't spawn threads on shutdown
authorEdward Hervey <edward@centricular.com>
Thu, 16 Nov 2017 17:22:20 +0000 (18:22 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 16 Nov 2017 17:22:20 +0000 (18:22 +0100)
commit38c835ec1eeeaa377c0910fb31365bd151974503
tree928c4962125a1a50eac7195fda99e9065ed2a242
parente72aa501b02dbaa6271d002e6d6cd23301960bb5
decodebin2: Don't spawn threads on shutdown

If we are shutting down, don't spawn a cleanup thread to cleanup old
groups and instead queue them to be cleaned up in the state change
thread.

This avoids (hopefully for good) having a race between the state change
thread and other threads trying to deactivate elements/pads.
gst/playback/gstdecodebin2.c