audioaggregator: fix input buffer when converting
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Wed, 10 Mar 2021 15:22:14 +0000 (16:22 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>
Wed, 10 Mar 2021 15:34:28 +0000 (16:34 +0100)
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>

gst-libs/gst/audio/gstaudioaggregator.c

index 85dbd2a..d8da5db 100644 (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);
     }