X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgsttaglist.c;h=4845d9077883fdfb7af15068d58a1aa14eea6b00;hb=f34472822c257359d69ebf671b81d85646a40618;hp=dd036de0e704f5f1584c41dbe7e5692e2c7d490e;hpb=a87b4551a6090663a1714f263d4e20fe75eb46ca;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index dd036de..4845d90 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -604,7 +604,7 @@ gst_tag_get_type (const gchar * tag) * Returns the human-readable name of this tag, You must not change or free * this string. * - * Returns: the human-readable name of this tag + * Returns: (nullable): the human-readable name of this tag */ const gchar * gst_tag_get_nick (const gchar * tag) @@ -613,7 +613,11 @@ gst_tag_get_nick (const gchar * tag) g_return_val_if_fail (tag != NULL, NULL); info = gst_tag_lookup (tag); - g_return_val_if_fail (info != NULL, NULL); + if (!info) { + GST_WARNING ("Unknown tag: %s", tag); + + return tag; + } return info->nick; } @@ -625,7 +629,7 @@ gst_tag_get_nick (const gchar * tag) * Returns the human-readable description of this tag, You must not change or * free this string. * - * Returns: the human-readable description of this tag + * Returns: (nullable): the human-readable description of this tag */ const gchar * gst_tag_get_description (const gchar * tag) @@ -715,6 +719,10 @@ __gst_tag_list_free (GstTagList * list) gst_structure_free (GST_TAG_LIST_STRUCTURE (list)); +#ifdef USE_POISONING + memset (list, 0xff, sizeof (GstTagListImpl)); +#endif + g_slice_free1 (sizeof (GstTagListImpl), list); } @@ -1295,7 +1303,7 @@ gst_tag_list_add_valist (GstTagList * list, GstTagMergeMode mode, g_warning ("%s: %s", G_STRLOC, error); g_free (error); /* we purposely leak the value here, it might not be - * in a sane state if an error condition occoured + * in a sane state if an error condition occurred */ return; } @@ -1636,6 +1644,18 @@ TAG_MERGE_FUNCS (int, gint, TRUE); */ TAG_MERGE_FUNCS (uint, guint, TRUE); /** + * gst_tag_list_get_int64: + * @list: a #GstTagList to get the tag from + * @tag: tag to read out + * @value: (out): location for the result + * + * Copies the contents for the given tag into the value, merging multiple values + * into one if multiple values are associated with the tag. + * + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + * given list. + */ +/** * gst_tag_list_get_int64_index: * @list: a #GstTagList to get the tag from * @tag: tag to read out