* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (char, gchar, TRUE)
+TAG_MERGE_FUNCS (char, gchar, TRUE);
/**
* gst_tag_list_get_uchar:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (uchar, guchar, TRUE)
+TAG_MERGE_FUNCS (uchar, guchar, TRUE);
/**
* gst_tag_list_get_boolean:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (boolean, gboolean, TRUE)
+TAG_MERGE_FUNCS (boolean, gboolean, TRUE);
/**
* gst_tag_list_get_int:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (int, gint, TRUE)
+TAG_MERGE_FUNCS (int, gint, TRUE);
/**
* gst_tag_list_get_uint:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (uint, guint, TRUE)
+TAG_MERGE_FUNCS (uint, guint, TRUE);
/**
* gst_tag_list_get_long:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (long, glong, TRUE)
+TAG_MERGE_FUNCS (long, glong, TRUE);
/**
* gst_tag_list_get_ulong:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (ulong, gulong, TRUE)
+TAG_MERGE_FUNCS (ulong, gulong, TRUE);
/**
* gst_tag_list_get_int64:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (int64, gint64, TRUE)
+TAG_MERGE_FUNCS (int64, gint64, TRUE);
/**
* gst_tag_list_get_uint64:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (uint64, guint64, TRUE)
+TAG_MERGE_FUNCS (uint64, guint64, TRUE);
/**
* gst_tag_list_get_float:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (float, gfloat, TRUE)
+TAG_MERGE_FUNCS (float, gfloat, TRUE);
/**
* gst_tag_list_get_double:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (double, gdouble, TRUE)
+TAG_MERGE_FUNCS (double, gdouble, TRUE);
/**
* gst_tag_list_get_pointer:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (pointer, gpointer, (*value != NULL))
+TAG_MERGE_FUNCS (pointer, gpointer, (*value != NULL));
+
+static inline gchar *
+_gst_strdup0 (const gchar * s)
+{
+ if (s == NULL || *s == '\0')
+ return NULL;
+
+ return g_strdup (s);
+}
+
#undef COPY_FUNC
-#define COPY_FUNC g_strdup
+#define COPY_FUNC _gst_strdup0
+
/**
* gst_tag_list_get_string:
* @list: a #GstTagList to get the tag from
* Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the
* given list.
*/
-TAG_MERGE_FUNCS (string, gchar *, (*value != NULL && **value != '\0'))
+TAG_MERGE_FUNCS (string, gchar *, (*value != NULL));
/*
*FIXME 0.11: Instead of _peek (non-copy) and _get (copy), we could have