tsdemux: Protect demux->segment_event with a mutex