gstreamer/subprojects/gst-plugins-bad/ext
François Laignel 32fbad8d39 srtpdec: fix Got data flow before segment event
A race condition can occur in `srtpdec` during the READY -> NULL transition:
an RTCP buffer can make its way to `gst_srtp_dec_chain` while the element is
partially stopped, resulting in the following critical warning:

> Got data flow before segment event

The problematic sequence is the following:

1. An RTCP buffer is being handled by the chain function for the
   `rtcp_sinkpad`. Since, this is the first buffer, we try pushing the sticky
   events to `rtcp_srcpad`.
2. At the same moment, the element is being transitioned from PAUSED to READY.
3. While checking and pushing the sticky events for `rtcp_srcpad`, we reach the
   Segment event. For this, we try to get it from the "otherpad", in this case
   `rtp_srcpad`. In the problematic case, `rtp_srcpad` has already been
   deactivated so its sticky events have been cleared. We won't be pushing any
   Segment event to `rtcp_srcpad`.
4. We return to the chain function for `rtcp_sinkpad` and try pushing the
   buffer to `rtcp_srcpad` for which deactivation hasn't started yet, hence the
   "Got data flow before segment event".

This commit:

- Adds a boolean return value to `gst_srtp_dec_push_early_events`: in case the
  Segment event can't be retrieved, `gst_srtp_dec_chain` can return  an error
  instead of calling `gst_pad_push`.
- Replaces the obsolete `gst_pad_set_caps` with `gst_pad_push_event`. The
  additional preconditions checked by previous function are guaranteed here
  since we push a fixed Caps which was built in the same function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4844>
2023-06-14 11:59:33 +00:00
..
aes aesdec: Fix padding removal for per-buffer-padding=FALSE 2022-11-15 00:13:15 +11:00
aom av1enc: Use correct enum type with libaom >= 3 2023-03-25 07:12:53 +00:00
assrender meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
avtp gst-plugins-bad: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
bs2b plugins: Fix various trivial clang compiler warnings 2023-03-18 16:16:55 +02:00
bz2 meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
chromaprint meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
closedcaption closedcaption: write 0x00 padding instead of 0x80 in cc_data/cdp 2023-05-10 00:52:01 +00:00
codec2json codec2json: Add av12json element 2023-01-30 19:46:55 +00:00
colormanagement meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
curl curlbasesink: error codes in transfer error details 2023-03-29 10:03:36 +00:00
dash doc: Fix newline char between authors 2023-05-20 05:48:23 +00:00
dc1394 meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
directfb dfbvideosink: Fix compile error 2023-01-08 03:49:03 +00:00
dtls gst-plugins-bad: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
dts meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
faac meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
faad meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
fdkaac fdkaacdec: Support up to 5 rear channels 2023-05-30 14:18:08 +02:00
flite meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
fluidsynth fluidsynth: correctly version guard methods 2022-09-05 17:48:27 +00:00
gme meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
gs gssink: add 'content-type' property 2022-11-10 09:53:29 +00:00
gsm meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
gtk waylandsink: Emit "map" signal boarder surface is ready 2023-05-31 18:57:56 +00:00
hls doc: Fix newline char between authors 2023-05-20 05:48:23 +00:00
iqa meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
isac meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
kate gst-plugins-bad: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
ladspa ladspa: Don't leak plugin information on registration 2022-11-04 17:59:21 +00:00
ldac meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
libde265 meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
lv2 gst-plugins-bad: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
mdns meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
modplug meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
mpeg2enc doc: Fix newline char between authors 2023-05-20 05:48:23 +00:00
mplex doc: Fix newline char between authors 2023-05-20 05:48:23 +00:00
musepack meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
neon meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
onnx onnxobjectdetector: gracefully handle Ort exceptions rather than dumping core 2023-06-05 17:47:58 +00:00
openal plugins: Fix various trivial clang compiler warnings 2023-03-18 16:16:55 +02:00
openaptx meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
opencv meson: Accept latest version of opencv 4.x 2022-12-30 17:10:12 +00:00
openexr meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
openh264 meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
openjpeg openjpegenc: do not set bpp field on opj_image_cmptparm_t 2023-05-26 20:24:27 +00:00
openmpt meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
openni2 meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
opus meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
qroverlay debugqroverlay: fix string leak 2023-03-27 07:37:11 +00:00
resindvd gst-plugins-bad: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
rsvg meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
rtmp meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
sbc meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
sctp sctpenc: Fix potential shutdown deadlock 2023-05-15 06:57:07 +00:00
smoothstreaming meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
sndfile meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
soundtouch build/android: remove all references to gnustl 2023-06-03 23:21:34 +00:00
spandsp meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
srt srt: assert instead of segfault when passing no error to ERROR_TO_WARNING 2023-05-02 21:01:45 +00:00
srtp srtpdec: fix Got data flow before segment event 2023-06-14 11:59:33 +00:00
svtav1 svtav1enc: Drain and completely reallocate the encoder instance on caps changes 2023-02-14 11:59:48 +00:00
svthevcenc svthevcenc: drop use of GSlice 2023-01-24 15:25:07 +00:00
teletextdec taglist, plugins: fix compiler warnings with GLib >= 2.76 2023-03-27 07:37:11 +00:00
ttml ttml: drop use of GSlice 2023-01-24 15:25:07 +00:00
voaacenc meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
voamrwbenc voamrwbenc: Fix truncation of audio data at end-of-stream when audio data 2022-09-16 00:14:58 +00:00
vulkan vkdownload: input memories may not match output memories 2023-05-19 04:26:30 +00:00
wayland waylandsink: Add a comment about dmabuf without feature 2023-03-15 18:42:54 +00:00
webp meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
webrtc webrtc: Add data-channels-opened/closed to get-stats signal documentation 2023-05-18 12:08:55 +00:00
webrtcdsp build/android: remove all references to gnustl 2023-06-03 23:21:34 +00:00
wildmidi meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
wpe wpe: Add support for the WPEWebKit 2.0 API version 2023-05-12 14:20:31 +00:00
x265 gst-plugins-bad: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
zbar meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
zxing zxing: add support for zxing-c++ 2.0 2023-03-10 09:33:35 +00:00
meson.build svtav1: Integrate into the build system properly 2023-02-03 22:14:18 +02:00