mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
2e4fd325e7
This patch prevents a possible race condition from taking place between the EOS event handling and rtcp send function/thread. The condition starts by getting the GST_EVENT_EOS event on the send_rtp_sink pad, which causes two core things to happen -- the event gets pushed down to the send_rtp_src pad and all sessions get marked "bye" prior to completion of the event handler. In another thread the rtp_session_on_timeout function gets called after an expiration of gst_clock_id_wait in the rtcp_thread function. This results in a call to the ess->callbacks.send_rtcp(), which is configured as a function pointer to gst_rtp_session_send_rtcp via the RTPSessionCallbacks structure passed to rtp_session_set_callbacks in the gst_rtp_session_init function. In the race condition, the call to gst_rtp_session_send_rtcp can have the all_sources_bye boolean set to true while GST_PAD_IS_EOS(rtpsession->send_rtp_sink) evaluates to false. This is the result of gst_rtp_session_send_rtcp running before the send_rtp_sink's GST_EVENT_EOS handler completes. The exact point at which this condition occurs is if there's a context switch to the rtcp_thread right after the call to rtp_session_mark_all_bye in the GET_EVENT_EOS handler, but before the handler returns. Normally, this would not be an issue because the rtcp_thread continues to run and indirectly call gst_rtp_session_send_rtcp. However, the call to rtp_source_reset sets the sent_bye boolean to false, which ends up causing rtp_session_are_all_sources_bye to return false. This gets passed to gst_rtp_session_send_rtcp and the EOS event never gets sent. The race condition results in the EOS event never getting passed to the rtcp_src pad, which prevents the bin and pipeline from ever completing with EOS. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3798> |
||
---|---|---|
.. | ||
gst-devtools | ||
gst-docs | ||
gst-editing-services | ||
gst-examples | ||
gst-integration-testsuites | ||
gst-libav | ||
gst-omx | ||
gst-plugins-bad | ||
gst-plugins-base | ||
gst-plugins-good | ||
gst-plugins-ugly | ||
gst-python | ||
gst-rtsp-server | ||
gstreamer | ||
gstreamer-sharp | ||
gstreamer-vaapi | ||
macos-bison-binary | ||
packagefiles/pango-1.50.12 | ||
win-flex-bison-binaries | ||
win-nasm | ||
avtp.wrap | ||
bindinator.wrap | ||
cairo.wrap | ||
dav1d.wrap | ||
dssim.wrap | ||
dv.wrap | ||
expat.wrap | ||
fdk-aac.wrap | ||
FFmpeg.wrap | ||
fontconfig.wrap | ||
freetype2.wrap | ||
fribidi.wrap | ||
gl-headers.wrap | ||
glib-networking.wrap | ||
glib.wrap | ||
graphene.wrap | ||
gst-plugins-rs.wrap | ||
gtk-sharp.wrap | ||
gtk.wrap | ||
harfbuzz.wrap | ||
json-glib.wrap | ||
lame.wrap | ||
libdrm.wrap | ||
libffi.wrap | ||
libjpeg-turbo.wrap | ||
libmicrodns.wrap | ||
libnice.wrap | ||
libopenjp2.wrap | ||
libpng.wrap | ||
libpsl.wrap | ||
libsoup.wrap | ||
libsrtp2.wrap | ||
libwpe.wrap | ||
libxml2.wrap | ||
ogg.wrap | ||
openh264.wrap | ||
opus.wrap | ||
orc.wrap | ||
pango.wrap | ||
pixman.wrap | ||
proxy-libintl.wrap | ||
pycairo.wrap | ||
pygobject.wrap | ||
sqlite3.wrap | ||
vorbis.wrap | ||
webrtc-audio-processing.wrap | ||
wpebackend-fdo.wrap | ||
x264.wrap | ||
zlib.wrap |