mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
asfdemux: nicer metadata extraction of genre tags in some cases
Handle pseudo-strings like "(5)" and map them to the ID3v1 genre that they presumably stand for.
This commit is contained in:
parent
2aeecee037
commit
181db09d90
1 changed files with 10 additions and 0 deletions
|
@ -2276,6 +2276,16 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 * data,
|
||||||
gst_value_set_date (&tag_value, date);
|
gst_value_set_date (&tag_value, date);
|
||||||
g_date_free (date);
|
g_date_free (date);
|
||||||
}
|
}
|
||||||
|
} else if (strcmp (gst_tag_name, GST_TAG_GENRE) == 0) {
|
||||||
|
guint id3v1_genre_id;
|
||||||
|
const gchar *genre_str;
|
||||||
|
|
||||||
|
if (sscanf (value_utf8, "(%u)", &id3v1_genre_id) == 1 &&
|
||||||
|
((genre_str = gst_tag_id3_genre_get (id3v1_genre_id)))) {
|
||||||
|
GST_DEBUG ("Genre: %s -> %s", value_utf8, genre_str);
|
||||||
|
g_free (value_utf8);
|
||||||
|
value_utf8 = g_strdup (genre_str);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
GType tag_type;
|
GType tag_type;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue