mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 00:28:21 +00:00
libgsttag: don't extract genres from empty ID3v1 tags
If we don't have any other info, don't try to interpret the genre field. In particular we don't want to interpret a genre of 0 as 'Blues' if no other fields are set and the entire tag is just empty.
This commit is contained in:
parent
ef1030ee6e
commit
5da78c8489
1 changed files with 1 additions and 1 deletions
|
@ -391,7 +391,7 @@ gst_tag_list_new_from_id3v1 (const guint8 * data)
|
|||
gst_tag_extract_id3v1_string (list, GST_TAG_COMMENT, (gchar *) & data[97],
|
||||
30);
|
||||
}
|
||||
if (data[127] < gst_tag_id3_genre_count ()) {
|
||||
if (data[127] < gst_tag_id3_genre_count () && !gst_tag_list_is_empty (list)) {
|
||||
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_GENRE,
|
||||
gst_tag_id3_genre_get (data[127]), NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue