pidgin/pidgin

39ac50435cfb
Parents c4ecb8c08b9d
Children 9a1dee79e02b
Fix an issue where the build failed with vv disabled but gstreamer available.

This is kind of ugly, but mediamanager.c is a spaghetti mess of preproc and
this appeared to be the best/quickest way to fix the issue as
PurpleMediaManager isn't fully defined unless vv is enabled.

Testing Done:
Just a compile test with `--disable-vv` as well as no arguments to configure.

Reviewed at https://reviews.imfreedom.org/r/25/
--- a/libpurple/mediamanager.c Thu Jul 02 03:17:16 2020 -0500
+++ b/libpurple/mediamanager.c Sun Jul 12 15:40:06 2020 -0500
@@ -2231,6 +2231,7 @@
purple_media_manager_unregister_gst_device(PurpleMediaManager *manager,
GstDevice *device)
{
+#ifdef USE_VV
GList *i;
gchar *name;
gchar *device_class;
@@ -2277,6 +2278,7 @@
g_free(name);
g_free(device_class);
+#endif /* USE_VV */
}
static gboolean
@@ -2304,7 +2306,7 @@
static void
purple_media_manager_init_device_monitor(PurpleMediaManager *manager)
{
-#if GST_CHECK_VERSION(1, 4, 0)
+#if GST_CHECK_VERSION(1, 4, 0) && defined(USE_VV)
GstBus *bus;
GList *i;
@@ -2334,6 +2336,7 @@
PurpleMediaElementType type)
{
GList *result = NULL;
+#ifdef USE_VV
GList *i;
for (i = manager->priv->elements; i; i = i->next) {
@@ -2347,6 +2350,7 @@
result = g_list_prepend(result, info);
}
}
+#endif /* USE_VV */
return result;
}