vorbistag: don't ever return NULL in list of strings.
This commit is contained in:
parent
b565a3088c
commit
1f43f87023
@ -566,6 +566,7 @@ gst_tag_to_vorbis_comments (const GstTagList * list, const gchar * tag)
|
|||||||
g_free (val);
|
g_free (val);
|
||||||
} else {
|
} else {
|
||||||
GST_WARNING ("Not a valid extended comment string: %s", str);
|
GST_WARNING ("Not a valid extended comment string: %s", str);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
result = g_strdup_printf ("%s=%s", vorbis_tag, str);
|
result = g_strdup_printf ("%s=%s", vorbis_tag, str);
|
||||||
@ -587,14 +588,15 @@ gst_tag_to_vorbis_comments (const GstTagList * list, const gchar * tag)
|
|||||||
if (tag_type == GST_TYPE_DATE) {
|
if (tag_type == GST_TYPE_DATE) {
|
||||||
GDate *date;
|
GDate *date;
|
||||||
|
|
||||||
if (gst_tag_list_get_date_index (list, tag, i, &date)) {
|
if (!gst_tag_list_get_date_index (list, tag, i, &date))
|
||||||
/* vorbis suggests using ISO date formats */
|
g_return_val_if_reached (NULL);
|
||||||
result =
|
|
||||||
g_strdup_printf ("%s=%04d-%02d-%02d", vorbis_tag,
|
/* vorbis suggests using ISO date formats */
|
||||||
(gint) g_date_get_year (date), (gint) g_date_get_month (date),
|
result =
|
||||||
(gint) g_date_get_day (date));
|
g_strdup_printf ("%s=%04d-%02d-%02d", vorbis_tag,
|
||||||
g_date_free (date);
|
(gint) g_date_get_year (date), (gint) g_date_get_month (date),
|
||||||
}
|
(gint) g_date_get_day (date));
|
||||||
|
g_date_free (date);
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG ("Couldn't write tag %s", tag);
|
GST_DEBUG ("Couldn't write tag %s", tag);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user