audioaggregator: fix input buffer when converting

This code path is meant to convert the current buffer to the new format
on update. It was using priv->input_buffer as input which is either
priv->buffer or a converted version of it.
Use priv->buffer instead as priv->input_buffer may no longer be a valid
reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1061>
This commit is contained in:
Guillaume Desmottes 2021-03-10 16:22:14 +01:00
parent e135961e1e
commit 44358f1eaf

View file

@ -1071,7 +1071,7 @@ gst_audio_aggregator_update_converters (GstAudioAggregator * aagg,
if (aaggpad->priv->buffer) {
GstBuffer *new_converted_buffer =
gst_audio_aggregator_convert_buffer (aagg, GST_PAD (aaggpad),
old_info, new_info, aaggpad->priv->input_buffer);
old_info, new_info, aaggpad->priv->buffer);
gst_buffer_replace (&aaggpad->priv->buffer, new_converted_buffer);
gst_buffer_unref (new_converted_buffer);
}