diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c index bc4fca45c5..4d7250b0f8 100644 --- a/gst/spectrum/gstspectrum.c +++ b/gst/spectrum/gstspectrum.c @@ -1134,7 +1134,7 @@ gst_spectrum_transform_ip (GstBaseTransform * trans, GstBuffer * buffer) spectrum->message_ts += gst_util_uint64_scale (spectrum->num_frames, GST_SECOND, rate); - for (c = 0; c < channels; c++) { + for (c = 0; c < output_channels; c++) { cd = &spectrum->channel_data[c]; gst_spectrum_reset_message_data (spectrum, cd); }