diff --git a/ChangeLog b/ChangeLog index 42be076e42..dbcbce0c91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-03-03 Jan Schmidt + + * gst/gst.c: + Add a check and output a g_warning when GStreamer is built + against GLib 2.6 but running against 2.8 or higher, and vice + versa. (Closes: #323542) + 2006-03-03 Jan Schmidt * gst/parse/parse.l: diff --git a/gst/gst.c b/gst/gst.c index 4abda14afd..b0fbfb7236 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -463,6 +463,23 @@ split_and_iterate (const gchar * stringlist, gchar * separator, GFunc iterator, static gboolean init_pre (void) { +#ifdef GST_HAVE_GLIB_2_8 + /* GStreamer was built against a GLib >= 2.8 and is therefore not doing + * the refcount hack. Check that it isn't being run against an older GLib */ + if (glib_major_version < 2 || + (glib_major_version == 2 && glib_minor_version < 8)) { +#else + /* GStreamer was built against a GLib < 2.8 and is therefore doing + * the refcount hack. Check that it isn't being run against a newer GLib */ + if (glib_major_version > 2 || + (glib_major_version == 2 && glib_minor_version >= 8)) { +#endif + g_warning ("GStreamer was compiled against GLib %d.%d.%d but is running" + " against %d.%d.%d. This will cause reference counting issues", + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION, + glib_major_version, glib_minor_version, glib_micro_version); + } + g_type_init (); if (g_thread_supported ()) {