From 9c7d3c8ab2182fd02429d8adc0ffb60237caf1a5 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 5 Nov 2015 11:34:07 +0100 Subject: [PATCH] volume: Do not try to get binding value array if we are not processing any sample In some conditions we might process empty buffers, calling gst_control_binding_get_value_array in that case will lead to the assertion: (lt-ges-launch-1.0:18859): GStreamer-CRITICAL **: gst_control_binding_get_value_array: assertion 'values' failed --- gst/volume/gstvolume.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index 0b6482a11b..d439e9be3c 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -760,7 +760,7 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf) self->volumes_count = nsamples; } - if (volume_cb) { + if (volume_cb && self->volumes) { have_volumes = gst_control_binding_get_value_array (volume_cb, ts, interval, nsamples, (gpointer) self->volumes); @@ -770,7 +770,7 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf) volume_orc_memset_f64 (self->volumes, self->current_volume, nsamples); } - if (mute_cb) { + if (mute_cb && self->mutes) { have_mutes = gst_control_binding_get_value_array (mute_cb, ts, interval, nsamples, (gpointer) self->mutes); gst_object_replace ((GstObject **) & mute_cb, NULL);