gstreamer/subprojects/gst-plugins-base/gst/playback
Yacine Bandou 03febb5048 streamsynchronizer: Fix deadlock when streams have been flushed before others start
To simplify the description, I'm assuming we only have two streams: video and audio.

For the video stream, we have the following events :
- STREAM_START => stream->wait set to true
- NEW_SEGMENT(1) => blocked waiting in gst_stream_synchronizer_wait
- FLUSH_START => unblocked
- FLUSH_STOP => stream->wait reset to false
- NEW_SEGMENT(2) => not waiting, since stream->wait is false

Then for the audio stream, we have the following events :
- STREAM_START => stream->wait set to true
- NEW_SEGMENT(2) => blocked waiting in gst_stream_synchronizer_wait for ever.

Note: The first NEW_SEGMENT event and the FLUSH_START, FLUSH_STOP events of the audio stream
are dropped before being received by the streamsynchronizer element, because the decodebin audio pad src
is not yet linked to the playsink audio pad sink.

To fix this deadlock, we don't reset stream->wait to false in the FLUSH_STOP event when it is not
waiting for the EOS of the other streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6763>
2024-05-20 20:31:11 +00:00
..
gstdecodebin2.c decodebin2: Properly free when shutting down in gst_decode_bin_expose 2023-12-01 19:10:54 +09:00
gstdecodebin3-parse.c decodebin3: Fix clean-up of EOS'd parsebin src pad 2024-01-09 19:00:38 +00:00
gstdecodebin3.c decodebin3: Fix caps and stream leaks 2024-05-16 10:46:33 +00:00
gstparsebin.c parsebin: Ensure non-time subtitle streams get "parsed" 2024-04-10 09:40:54 +02:00
gstplay-enum.c Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gstplay-enum.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gstplaybackelement.c Replace gst-i18n-*.h with gi18n-lib.h 2022-04-19 18:01:06 +00:00
gstplaybackelements.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gstplaybackplugin.c playback: Remove USE_PLAYBIN3 registration override 2024-03-04 12:23:34 +01:00
gstplaybackutils.c gst-plugins-base: re-indent with GNU indent 2.2.12 2023-03-17 03:18:53 +00:00
gstplaybackutils.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gstplaybin2.c playback: Support runtime change connection-speed of adaptivedemux(2) 2023-10-12 16:06:42 +00:00
gstplaybin3.c playbin3: Handle combiner update in case of errors 2024-04-26 11:31:32 +00:00
gstplaysink.c playsink: Fix volume leak 2023-04-20 14:21:15 +00:00
gstplaysink.h playbin3: Cleanup and refactor combiner sourcecombine 2022-05-06 09:10:09 +02:00
gstplaysinkaudioconvert.c playsink: Hold a reference to the soft volume element 2022-10-03 18:56:41 +00:00
gstplaysinkaudioconvert.h playsink: Hold a reference to the soft volume element 2022-10-03 18:56:41 +00:00
gstplaysinkconvertbin.c gst-plugins-base: re-indent with GNU indent 2.2.12 2023-03-17 03:18:53 +00:00
gstplaysinkconvertbin.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gstplaysinkvideoconvert.c Replace gst-i18n-*.h with gi18n-lib.h 2022-04-19 18:01:06 +00:00
gstplaysinkvideoconvert.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gstrawcaps.h playback: add onvif metadata caps to raw caps 2022-08-24 12:21:18 +03:00
gststreamsynchronizer.c streamsynchronizer: Fix deadlock when streams have been flushed before others start 2024-05-20 20:31:11 +00:00
gststreamsynchronizer.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gstsubtitleoverlay.c subtitleoverlay: Also use "Decoder/Subtitle" elements 2024-02-22 14:39:54 +00:00
gstsubtitleoverlay.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gsturidecodebin.c playback: Support runtime change connection-speed of adaptivedemux(2) 2023-10-12 16:06:42 +00:00
gsturidecodebin3.c decodebin3: Fix caps and stream leaks 2024-05-16 10:46:33 +00:00
gsturisourcebin.c decodebin3: Fix caps and stream leaks 2024-05-16 10:46:33 +00:00
meson.build meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00