mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 18:39:54 +00:00
049859c2cb
There is a race condition where transfer has not been submitted yet while the request is cancelled which leads to the transfer state going back to `DOWNLOAD_REQUEST_STATE_OPEN` and the user of the request to get signalled about its completion (and the task actually happening after it was cancelled) leading to assertions and misbehaviours. To ensure that this race can't happen, we start differentiating between the UNSENT and CANCELLED states as in the normal case, when entering `submit_request` the state is UNSENT and at that point we need to know that it is not because the request has been cancelled. In practice this case lead to an assertion in `gst_adaptive_demux2_stream_begin_download_uri` because in a previous call to `gst_adaptive_demux2_stream_stop_default` we cancelled the previous request and setup a new one while it had not been submitted yet and then got a `on_download_complete` callback called from that previous cancelled request and then we tried to do `download_request_set_uri` on a request that was still `in_use`, leading to something like: ``` #0: 0x0000000186655ec8 g_assert (request->in_use == FALSE)assert.c:0 #1: 0x00000001127236b8 libgstadaptivedemux2.dylib`download_request_set_uri(request=0x000060000017cc00, uri="https://XXX/chunk-stream1-00002.webm", range_start=0, range_end=-1) at downloadrequest.c:361 #2: 0x000000011271cee8 libgstadaptivedemux2.dylib`gst_adaptive_demux2_stream_begin_download_uri(stream=0x00000001330f1800, uri="https://XXX/chunk-stream1-00002.webm", start=0, end=-1) at gstadaptivedemux-stream.c:1447 #3: 0x0000000112719898 libgstadaptivedemux2.dylib`gst_adaptive_demux2_stream_load_a_fragment [inlined] gst_adaptive_demux2_stream_download_fragment(stream=0x00000001330f1800) at gstadaptivedemux-stream.c:0 #4: 0x00000001127197f8 libgstadaptivedemux2.dylib`gst_adaptive_demux2_stream_load_a_fragment(stream=0x00000001330f1800) at gstadaptivedemux-stream.c:1969 #5: 0x000000011271c2a4 libgstadaptivedemux2.dylib`gst_adaptive_demux2_stream_next_download(stream=0x00000001330f1800) at gstadaptivedemux-stream.c:2112 ``` Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5435> |
||
---|---|---|
.. | ||
gst-devtools | ||
gst-docs | ||
gst-editing-services | ||
gst-examples | ||
gst-integration-testsuites | ||
gst-libav | ||
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 | ||
win-flex-bison-binaries | ||
win-nasm | ||
win-pkgconfig | ||
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 | ||
gobject-introspection.wrap | ||
graphene.wrap | ||
gst-plugins-rs.wrap | ||
gtk-sharp.wrap | ||
gtk.wrap | ||
harfbuzz.wrap | ||
json-glib.wrap | ||
lame.wrap | ||
libdrm.wrap | ||
libffi.wrap | ||
libgudev.wrap | ||
libjpeg-turbo.wrap | ||
liblc3.wrap | ||
libmicrodns.wrap | ||
libnice.wrap | ||
libopenjp2.wrap | ||
libpng.wrap | ||
libpsl.wrap | ||
libsoup.wrap | ||
libsrtp2.wrap | ||
libva.wrap | ||
libwpe.wrap | ||
libxml2.wrap | ||
ogg.wrap | ||
openh264.wrap | ||
opus.wrap | ||
orc.wrap | ||
pango.wrap | ||
pcre2.wrap | ||
pixman.wrap | ||
proxy-libintl.wrap | ||
pycairo.wrap | ||
pygobject.wrap | ||
sqlite3.wrap | ||
vorbis.wrap | ||
vpx.wrap | ||
webrtc-audio-processing.wrap | ||
wpebackend-fdo.wrap | ||
x264.wrap | ||
zlib.wrap |