changeset 26307:5ee7e8f209bb

Silence warning about videotestsrc not having two properties.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Thu, 19 Mar 2009 12:44:52 +0000
parents 5906409c4b69
children f34fd86de085
files libpurple/mediamanager.c
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/mediamanager.c	Thu Mar 19 12:28:42 2009 +0000
+++ b/libpurple/mediamanager.c	Thu Mar 19 12:44:52 2009 +0000
@@ -498,10 +498,19 @@
 			ow->sink = purple_media_manager_get_element(
 					manager, PURPLE_MEDIA_RECV_VIDEO);
 
-			if (participant == NULL)
+			if (participant == NULL) {
 				/* aka this is a preview sink */
-				g_object_set(G_OBJECT(ow->sink), "sync", FALSE,
-						"async", "FALSE", NULL);
+				GObjectClass *klass =
+						G_OBJECT_GET_CLASS(ow->sink);
+				if (g_object_class_find_property(klass,
+						"sync"))
+					g_object_set(G_OBJECT(ow->sink),
+							"sync", "FALSE", NULL);
+				if (g_object_class_find_property(klass,
+						"async"))
+					g_object_set(G_OBJECT(ow->sink),
+							"async", FALSE, NULL);
+			}
 
 			gst_bin_add_many(GST_BIN(GST_ELEMENT_PARENT(tee)),
 					queue, ow->sink, NULL);