Index: gst/gsttaglist.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gsttaglist.c,v
retrieving revision 1.49
diff -u -p -r1.49 gsttaglist.c
--- gst/gsttaglist.c	7 Oct 2006 18:41:19 -0000	1.49
+++ gst/gsttaglist.c	7 Oct 2006 19:12:13 -0000
@@ -469,6 +469,25 @@ gst_tag_list_new (void)
 }
 
 /**
+ * gst_tag_list_is_empty:
+ * @taglist: A #GstTagList.
+ *
+ * Checks if the given taglist is empty.
+ *
+ * Returns: TRUE if the taglist is empty, otherwise FALSE.
+ *
+ * Since: 0.10.11
+ */
+gboolean
+gst_tag_list_is_empty (const GstTagList * taglist)
+{
+  g_return_val_if_fail (taglist != NULL, FALSE);
+  g_return_val_if_fail (GST_IS_TAG_LIST (taglist), FALSE);
+
+  return (gst_structure_n_fields ((GstStructure *) taglist) == 0);
+}
+
+/**
  * gst_is_tag_list:
  * @p: Object that might be a taglist
  *
Index: gst/gsttaglist.h
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gsttaglist.h,v
retrieving revision 1.36
diff -u -p -r1.36 gsttaglist.h
--- gst/gsttaglist.h	7 Oct 2006 18:41:19 -0000	1.36
+++ gst/gsttaglist.h	7 Oct 2006 19:12:14 -0000
@@ -135,6 +135,7 @@ gboolean               gst_tag_is_fixed 
 GstTagList * gst_tag_list_new               (void);
 gboolean     gst_is_tag_list                (gconstpointer p);
 GstTagList * gst_tag_list_copy              (const GstTagList * list);
+gboolean     gst_tag_list_is_empty          (const GstTagList * list);
 void         gst_tag_list_insert            (GstTagList       * into,
                                              const GstTagList * from,
                                              GstTagMergeMode    mode);
Index: docs/gst/gstreamer-sections.txt
===================================================================
RCS file: /cvs/gstreamer/gstreamer/docs/gst/gstreamer-sections.txt,v
retrieving revision 1.276
diff -u -p -r1.276 gstreamer-sections.txt
--- docs/gst/gstreamer-sections.txt	5 Oct 2006 12:31:07 -0000	1.276
+++ docs/gst/gstreamer-sections.txt	7 Oct 2006 19:12:15 -0000
@@ -1831,6 +1831,7 @@ gst_tag_get_flag
 gst_tag_is_fixed
 gst_tag_list_new
 gst_is_tag_list
+gst_tag_list_is_empty
 gst_tag_list_copy
 gst_tag_list_insert
 gst_tag_list_merge
Index: tests/check/gst/gsttag.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/tests/check/gst/gsttag.c,v
retrieving revision 1.8
diff -u -p -r1.8 gsttag.c
--- tests/check/gst/gsttag.c	7 Oct 2006 18:41:19 -0000	1.8
+++ tests/check/gst/gsttag.c	7 Oct 2006 19:12:15 -0000
@@ -229,6 +229,14 @@ GST_START_TEST (test_type)
 
   /* this however should be fine */
   fail_if (GST_IS_TAG_LIST (NULL));
+
+  /* check gst_tag_list_is_empty */
+  ASSERT_CRITICAL (gst_tag_list_is_empty (NULL));
+  taglist = gst_tag_list_new ();
+  fail_unless (gst_tag_list_is_empty (taglist));
+  gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "JD", NULL);
+  fail_if (gst_tag_list_is_empty (taglist));
+  gst_tag_list_free (taglist);
 }
 
 GST_END_TEST;
