gstreamer/subprojects/gst-plugins-base/gst-libs/gst
Nirbheek Chauhan 554a2a5145 audio-converter: Fix resampling when there's nothing to output
Sometimes we can't output anything because we don't have enough
incoming frames. In that case, the resampler was trying to call
do_quantize() and do_resample() in a loop forever because there would
never be samples to output (so chain->samples would always be NULL).

Fix this by not calling chain->make_func() in a loop -- seems
completely unnecessary since calling it over and over won't change
anything if the make_func() can't output samples.

Also add some checks for the input and / or output being NULL when
doing conversion or quantization. This will happen when we have
nothing to output.

We can't bail early, because we need resampler->samples_avail to be
updated in gst_audio_resampler_resample(), so we must call that and
no-op everything along the way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1461>
2022-01-08 05:15:30 +00:00
..
allocators gst-plugins-base: define G_LOG_DOMAIN for all libraries 2021-10-19 00:12:25 +00:00
app appsrc: log when segment changes 2021-11-09 16:19:05 +00:00
audio audio-converter: Fix resampling when there's nothing to output 2022-01-08 05:15:30 +00:00
fft gst-plugins-base: define G_LOG_DOMAIN for all libraries 2021-10-19 00:12:25 +00:00
gl glcontext/egl: add missing unref 2021-11-10 15:27:45 +00:00
pbutils docs: fix unnecessary ampersand, < and > escaping in code blocks 2021-11-12 11:39:19 +00:00
riff gst-plugins-base: define G_LOG_DOMAIN for all libraries 2021-10-19 00:12:25 +00:00
rtp tests/rtp/payload: add test for shrinking extension data 2021-10-19 03:26:57 +00:00
rtsp gst-plugins-base: define G_LOG_DOMAIN for all libraries 2021-10-19 00:12:25 +00:00
sdp sdp: Handle level-asymmetry-allowed for H264 streams 2021-12-12 10:59:00 -03:00
tag meson: update for dep.get_pkgconfig_variable() deprecation 2021-10-20 11:20:44 +00:00
video video-info: Don't assume colorimetry of UHD resolution as BT.2020 2021-12-16 12:22:27 +00:00
gettext.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
glib-compat-private.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gst-i18n-app.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
gst-i18n-plugin.h Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
meson.build sdp: Handle level-asymmetry-allowed for H264 streams 2021-12-12 10:59:00 -03:00