splitmuxsink: Don't use the element state lock
authorJan Schmidt <jan@centricular.com>
Fri, 30 Oct 2020 15:19:07 +0000 (02:19 +1100)
committerJan Schmidt <thaytan@noraisin.net>
Sat, 31 Oct 2020 02:50:51 +0000 (02:50 +0000)
commitd12fa00195bbbb2111a89873d225c3a0df05faef
treee300a8334fec63c726d3502df875de607798bc49
parent41ca3b4e4362ffe6309b87eab19ec69cf6701d2a
splitmuxsink: Don't use the element state lock

Using the element state lock to avoid splitmuxsink shutting
down while doing element manipulations can lead to a deadlock on
shutdown if a fragment switch happens at exactly the wrong moment.

Use a private mutex and a shutdown boolean instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/798>
gst/multifile/gstsplitmuxsink.c
gst/multifile/gstsplitmuxsink.h