From c161defb4481f2eec1c1664481a332648c6f0f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 2 Sep 2012 03:55:35 +0100 Subject: [PATCH] id3tag: extract year to write into ID3v1 tag from GST_TAG_DATE_TIME not GST_TAG_DATE --- gst/id3tag/id3tag.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gst/id3tag/id3tag.c b/gst/id3tag/id3tag.c index 1cd9846cdb..d6c2f1ba16 100644 --- a/gst/id3tag/id3tag.c +++ b/gst/id3tag/id3tag.c @@ -1232,11 +1232,11 @@ static void date_v1_convert (const GstTagList * list, const gchar * tag, guint8 * dst, int maxlen, gboolean * wrote_tag) { - GDate *date; + GstDateTime *dt; /* Only one date supported */ - if (gst_tag_list_get_date_index (list, tag, 0, &date) && date != NULL) { - GDateYear year = g_date_get_year (date); + if (gst_tag_list_get_date_time_index (list, tag, 0, &dt)) { + guint year = gst_date_time_get_year (dt); /* Check for plausible year */ if (year > 500 && year < 2100) { gchar str[5]; @@ -1247,7 +1247,7 @@ date_v1_convert (const GstTagList * list, const gchar * tag, GST_WARNING ("invalid year %u, skipping", year); } - g_date_free (date); + gst_date_time_unref (dt); } } @@ -1307,7 +1307,7 @@ static const struct GST_TAG_TITLE, 3, 30, latin1_convert}, { GST_TAG_ARTIST, 33, 30, latin1_convert}, { GST_TAG_ALBUM, 63, 30, latin1_convert}, { - GST_TAG_DATE, 93, 4, date_v1_convert}, { + GST_TAG_DATE_TIME, 93, 4, date_v1_convert}, { GST_TAG_COMMENT, 97, 28, latin1_convert}, { /* Note: one-byte gap here */ GST_TAG_TRACK_NUMBER, 126, 1, track_number_convert}, {