gstreamer/gst/audioresample
Sebastian Dröge 6d423cbba2 audioresample: Drain the resampler and reset timestamp tracking on caps changes
Especially when changing the sample rate our timestamp tracking will be
completely off, but even otherwise we would usually lose the last few
samples if we don't drain here as the resampler gets reset if anything
but the sample rate changes.

This is usually not a problem as the first buffer after a caps event
usually has the discont flag set, but can cause problems if
 - the caps event is followed by a segment event, which then causes
   draining according to the new sample rate
 - the caps were changed because of rengotiation due to a reconfigure
   event and there is not discontinuity from upstream

In both cases we would output buffers with completely wrong timestamps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/670>
2020-05-27 17:06:08 +00:00
..
gstaudioresample.c audioresample: Drain the resampler and reset timestamp tracking on caps changes 2020-05-27 17:06:08 +00:00
gstaudioresample.h audioresample: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
meson.build doc: Port to hotdoc 2019-05-13 11:34:08 -04:00