[gst-cvs] gstreamer: controller: Silence a warning from the GSequence being NULL.

Jan Schmidt thaytan at kemper.freedesktop.org
Fri May 22 01:43:28 PDT 2009


Module: gstreamer
Branch: master
Commit: 2437a08666e6aff80236e7dd1d9c1cd5517407da
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=2437a08666e6aff80236e7dd1d9c1cd5517407da

Author: Jan Schmidt <thaytan at noraisin.net>
Date:   Fri May 22 09:41:36 2009 +0100

controller: Silence a warning from the GSequence being NULL.

Fix a warning that occurs when the self->priv->values is NULL and
the code tries to retrieve an iterator from it. The warning was showing
up in the checks for the volume element.

---

 libs/gst/controller/gstinterpolation.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libs/gst/controller/gstinterpolation.c b/libs/gst/controller/gstinterpolation.c
index 917250a..fdf7b6b 100644
--- a/libs/gst/controller/gstinterpolation.c
+++ b/libs/gst/controller/gstinterpolation.c
@@ -535,7 +535,8 @@ _interpolate_linear_get_##vtype (GstInterpolationControlSource *self, GstClockTi
     g_value_init (&cp.value, self->priv->type); \
     g_value_copy (&self->priv->default_value, &cp.value); \
     cp1 = &cp; \
-    iter = g_sequence_get_begin_iter (self->priv->values); \
+    if (self->priv->values) \
+      iter = g_sequence_get_begin_iter (self->priv->values); \
   } \
   if (iter) { \
     gdouble slope; \





More information about the Gstreamer-commits mailing list