From c785ff79365fb91a41e38458ae6ea5cf02cbaa8f Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 9 Sep 2011 13:45:31 +0200 Subject: dup_color_balance: check that element currently implements GstColorBalance https://bugzilla.gnome.org/show_bug.cgi?id=658584 --- src/empathy-video-src.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/empathy-video-src.c b/src/empathy-video-src.c index da86eda93..ca8370d82 100644 --- a/src/empathy-video-src.c +++ b/src/empathy-video-src.c @@ -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); } -- cgit v1.2.3