gstreamer/gst-libs/gst
Sebastian Dröge 71e46bcf38 audioaggregator: Resync on the next buffer when dropping a buffer on discont resyncing
If a buffer is dropped during resyncing on a discont because either its
end offset is already before the current output offset of the
aggregator or because it fully overlaps with the part of the current
output buffer that was already filled, then don't just assume that the
next buffer is going to start at exactly the expected offset. It might
still require some more dropping of samples.

This caused the input to be mixed with an offset to its actual position
in the output stream, causing additional latency and wrong
synchronization between the different input streams.

Instead consider each buffer after a discont as a discont until the
aggregator actually resynced and starts mixing samples from the input
again.

Also update the start output offset of a new input buffer if samples
have to be dropped at the beginning. Otherwise it might be mixed too
early into the output and overwrite part of the output buffer that
already took samples from this input into account.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/912
which is a regression introduced by https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1180/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1224>
2021-07-12 09:42:39 +03:00
..
allocators fdmemory: Allow for change of protection mode 2020-10-28 17:11:05 +00:00
app appsink: fix incorrect return nullability 2021-06-30 18:46:37 +00:00
audio audioaggregator: Resync on the next buffer when dropping a buffer on discont resyncing 2021-07-12 09:42:39 +03:00
fft Meson: Use pkg-config generator 2020-10-23 11:19:11 -04:00
gl gl/context/wgl: Add missing NULL init 2021-07-03 11:40:25 +00:00
pbutils Check mandatory ClockTime arguments 2021-06-16 14:52:38 +00:00
riff Use g_memdup2() where available and add fallback for older GLib versions 2021-06-02 14:21:02 +00:00
rtp rtpbasepayload: don't write empty extension header 2021-06-28 19:28:41 +02:00
rtsp gstrtspconnection: Add IPv6 support for tunneled mode 2021-06-24 06:10:19 +00:00
sdp Use g_memdup2() where available and add fallback for older GLib versions 2021-06-02 14:21:02 +00:00
tag gst: don't use volatile to mean atomic 2021-03-19 04:20:19 +00:00
video videodecoder: add API to receive subframes 2021-07-08 13:19:21 +02:00
gettext.h Fix FSF address 2012-11-03 23:05:09 +00:00
glib-compat-private.h Fix FSF address 2012-11-03 23:05:09 +00:00
gst-i18n-app.h tools: add simple command-line gst-play utility for testing purposes 2013-08-16 15:45:23 +01:00
gst-i18n-plugin.h Fix FSF address 2012-11-03 23:05:09 +00:00
meson.build meson: Add feature options for all plugins 2018-07-27 18:42:11 +05:30