tsdemux: Handle delayed seek events
Copied from https://gitlab.freedesktop.org//gstreamer/gst-plugins-bad/-/merge_requests/2135
commit 36146132ac7a2567e095e86845a263f97f1c2c88 (HEAD -> tsdemux_seek, vivia/tsdemux_seek)
Author: Vivia Nikolaidou
Date: Mon Apr 5 10:29:37 2021 +0300
tsdemux: Handle delayed seek events
Store the event in case it cannot be processed immediately and process
it after the first segment has been produced.
commit 5198923d7d00f8b500e1a9f4cab44ebbc19871da
Author: Vivia Nikolaidou
Date: Mon Apr 5 10:28:51 2021 +0300
tsdemux: Protect demux->segment_event with a mutex
Would otherwise cause weird issues when processing a delayed seek event