gstreamer/subprojects
Devin Anderson 0812c753c6 gst-libav: Fix synchronization issues and errors created by the forwarding of
segment events by demuxer.

In order to play nicely with `ffmpeg`, demuxers in `gst-libav` have to make
buffers available to `ffmpeg` while taking the blocking I/O model in `ffmpeg`
into account, which results in buffers not being sent downstream until `ffmpeg`
has processed them in its separate thread.

In constrast, many `gstreamer` events are simply forwarded downstream.
Currently `GST_EVENT_SEGMENT` events are forwarded downstream without any
processing, which can potentially result in:
 * `GST_EVENT_SEGMENT` events being out of sync with buffers
 * `GST_EVENT_SEGMENT` events going out that are incorrect because they apply
   to data seen by the demuxer, but not necessarily seen by downstream elements

I came across this bug when I was attempting to enable G723.1 demuxing/decoding
using the G723.1 demuxer and decoder provided by `ffmpeg`.  I wrote tests to
verify support for the functionality, and found that, in push mode,
`GST_EVENT_SEGMENT` events pushed to the demuxer by the upstream `filesrc`
element would be forwarded to the decoder without modification, resulting in
an internal data streaming error.  With this patch, tests work in both push and
pull mode.

This patch solves the problem by disabling the forwarding of
`GST_EVENT_SEGMENT` events downstream (an initial `GST_EVENT_SEGMENT` event is
still pushed downstream by the demuxer).  It's possible there's a better way to
do this, but, having looked at how a few different `gstreamer` demuxers deal
with `GST_EVENT_SEGMENT` events, it seems like the processing is somewhat
specific to the demuxer implementation, whereas `gst-libav` has one general way
of handling the situation for any `ffmpeg` demuxer.  Perhaps there's a better
way to solve this using the `ffmpeg` API to take advantage of specific demuxer
details.  IDK.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3218>
2022-10-21 23:17:58 +00:00
..
gst-devtools validate: Add/fix various annotations 2022-10-18 08:56:58 +00:00
gst-docs fake{video|audio}sink: don't proxy properties at instance init. 2022-10-19 09:12:11 +00:00
gst-editing-services ges: Add/fix various annotations 2022-10-18 13:51:16 +03:00
gst-examples examples: webrtc: mp-sendrecv: add bus handler 2022-10-19 00:51:44 +00:00
gst-integration-testsuites decodebin3: Do not try to plug a decoder on raw formats 2022-10-06 08:41:49 +00:00
gst-libav gst-libav: Fix synchronization issues and errors created by the forwarding of 2022-10-21 23:17:58 +00:00
gst-omx Back to development 2022-10-04 03:57:31 +01:00
gst-plugins-bad d3d11screencapture: Add WinRT API based capture mode 2022-10-21 14:21:28 +00:00
gst-plugins-base build/gl: fix automatic dispmanx detection for rpi4 2022-10-20 22:29:16 +00:00
gst-plugins-good wavparse: Avoid occasional crash due to referencing freed buffer. 2022-10-14 07:54:03 +00:00
gst-plugins-ugly Back to development 2022-10-04 03:57:31 +01:00
gst-python Back to development 2022-10-04 03:57:31 +01:00
gst-rtsp-server rtsp-server: Add/fix various annotations 2022-10-18 13:51:16 +03:00
gstreamer gst-inspect: Don't print link to doc if it's known to be unavailable 2022-10-22 05:36:38 +09:00
gstreamer-sharp Back to development 2022-10-04 03:57:31 +01:00
gstreamer-vaapi h265parse: fix typo in member of GstH265SPS 2022-10-04 10:01:12 +00:00
macos-bison-binary meson: Fix warning about check kwarg 2022-07-16 06:16:17 +00:00
packagefiles/pango-1.48.11 harfbuzz.wrap: Fix wrap type, and remove unnecessary patch 2022-07-29 19:56:11 +00:00
win-flex-bison-binaries meson: Use run_command check: true for windows binary subprojects 2022-10-19 04:05:05 +00:00
win-nasm meson: Use run_command check: true for windows binary subprojects 2022-10-19 04:05:05 +00:00
avtp.wrap subprojects/avtp: Update to latest avtp 0.2.0 2022-03-18 22:49:16 +00:00
bindinator.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
cairo.wrap subprojects: cairo: bump to 1.17.6 2022-09-17 22:41:40 +00:00
dav1d.wrap Add dav1d wrap file 2020-05-02 09:55:12 +00:00
dssim.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
dv.wrap subprojects: add libdv wrap 2021-01-14 19:16:01 +00:00
expat.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
fdk-aac.wrap subprojects: fdk-aac: add fallback_url 2021-10-28 23:29:27 +00:00
FFmpeg.wrap wraps:ffmpeg: Move to 4.4 2021-10-15 02:32:40 +00:00
fontconfig.wrap subprojects: fontconfig: bump to 2.14.0 2022-09-17 22:41:40 +00:00
freetype2.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
fribidi.wrap subprojects: fribidi: bump to 1.0.12 2022-09-17 22:41:40 +00:00
gl-headers.wrap Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
glib-networking.wrap subprojects: glib, glib-networking: bump to 2.72 2022-09-17 22:41:40 +00:00
glib.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
graphene.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
gst-plugins-rs.wrap subprojects: Switch gst-plugins-rs.wrap to the main branch 2022-02-16 09:54:07 +02:00
gtk-sharp.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
harfbuzz.wrap subprojects: harfbuzz: bump to 5.2.0 2022-09-17 22:41:40 +00:00
json-glib.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
lame.wrap meson: Update some wraps, remove unused wraps 2022-07-16 06:16:17 +00:00
libdrm.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
libffi.wrap subprojects: use libffi and gl-headers from gstreamer gitlab repos 2019-01-28 23:19:19 +01:00
libjpeg-turbo.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
libmicrodns.wrap subprojects: libmicrodns: bump to 0.2.0 + meson fixes 2022-09-17 22:41:40 +00:00
libnice.wrap subprojects: Update libnice to 0.1.19 2022-05-03 18:49:36 -04:00
libopenjp2.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
libpng.wrap subprojects/libpng: Update to latest wrap file 2022-01-28 02:01:39 +05:30
libpsl.wrap libpsl.wrap: pin to 0.21.1 tag 2020-10-26 12:13:12 +00:00
libsoup.wrap meson: Update libsoup.wrap 2022-10-11 14:53:40 -04:00
libwpe.wrap subprojects: Update libwpe and wpebackend-fdo for fallback support 2020-10-12 12:29:01 +00:00
libxml2.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
ogg.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
openh264.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
opus.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
orc.wrap meson: Add a new option to control the source for orc 2022-09-22 22:31:21 +00:00
pango.wrap subprojects: pango: bump to 1.50.10 2022-09-17 22:41:40 +00:00
pixman.wrap meson: Update subprojects to fix warnings 2022-01-25 14:25:19 +05:30
proxy-libintl.wrap Update proxy-libintl wrap to 0.4 2022-04-22 15:36:40 +00:00
pycairo.wrap {pygobject,pycairo}.wrap: point to stable refs 2020-09-15 15:51:42 +03:00
pygobject.wrap build: Fix some compiler warnings by upgrading wraps 2022-07-31 16:28:25 +05:30
sqlite3.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
vorbis.wrap meson: Update some wraps, remove unused wraps 2022-07-16 06:16:17 +00:00
webrtc-audio-processing.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
wpebackend-fdo.wrap subprojects: Update libwpe and wpebackend-fdo for fallback support 2020-10-12 12:29:01 +00:00
x264.wrap x264: update to latest stable 160.3011 2020-07-30 15:52:38 +01:00
zlib.wrap meson: Update some wraps, remove unused wraps 2022-07-16 06:16:17 +00:00