diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2015-11-05 11:34:07 +0100 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-11-05 11:44:56 +0100 |
commit | 1213c918c521837891f143920c6b7ce4fe6a57d4 (patch) | |
tree | 8a15ab49cc9150cfc427d50e539d12e37a0a4b93 | |
parent | c3f1f3ffb56dacae5959c8a1231fdc5695086191 (diff) | |
download | gstreamer-plugins-base-1213c918c521837891f143920c6b7ce4fe6a57d4.tar.gz |
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
-rw-r--r-- | gst/volume/gstvolume.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index 0b6482a11..d439e9be3 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); |