]> git.0d.be Git - empathy.git/commitdiff
dup_color_balance: check that element currently implements GstColorBalance
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 9 Sep 2011 11:45:31 +0000 (13:45 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 9 Sep 2011 11:46:02 +0000 (13:46 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=658584

src/empathy-video-src.c

index da86eda935b026ad26a6717283efc742d5b8d628..ca8370d82b66ce45592529ec95c0665043f5813a 100644 (file)
@@ -256,6 +256,15 @@ dup_color_balance (GstElement *src)
   if (color == NULL)
     return NULL;
 
+  /* colorbalance is wrapped by GstImplementsInterface, we
+   * need to check if it is actually supported for this instance
+   * in its current state before trying to use it */
+  if (!GST_IS_COLOR_BALANCE (color))
+    {
+      g_object_unref (color);
+      return NULL;
+    }
+
   return GST_COLOR_BALANCE (color);
 }