matroskademux: Guard read state transitions with locks

This patch adds locks to all pieces of code that were changing the read
state of matroskademux and were not already locking it.

This is necessary for seek event deferring to work without races.
Status Job ID Name Coverage
  Preparation
failed #63954
gst indent

00:00:27

passed #63953
manifest

00:00:19

 
  Build
skipped #63955
build fedora x86_64
 
  Test
skipped #63956
check fedora
 
  Full Builds
skipped #63957
build android arm64 api28
skipped #63958
build cerbero fedora x86_64
 
Name Stage Failure
failed
gst indent Preparation
           if (G_UNLIKELY (demux->segment.stop != -1
- && demux->segment.stop <= stream_pts
- && stream->on_keyframe)
+ && demux->segment.stop <= stream_pts && stream->on_keyframe)
&& !(demux->upstream_format_is_time && demux->segment.rate < 0)) {

GST_DEBUG_OBJECT (demux, "we reached the end of our segment.");

stream->time_position = GST_CLOCK_TIME_NONE; /* this means EOS */

style diverges, please run gst-indent first
ERROR: Job failed: exit code 1