mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
gstid3tag: Don't extract a track number unless present.
In ID3v1, a track number is present only if byte 125 is null AND byte 126 is non-null. If the track number is not present, don't add a track number tag with value 0.
This commit is contained in:
parent
243d366b34
commit
35a9de28f4
1 changed files with 1 additions and 1 deletions
|
@ -382,7 +382,7 @@ gst_tag_list_new_from_id3v1 (const guint8 * data)
|
||||||
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_DATE, date, NULL);
|
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_DATE, date, NULL);
|
||||||
g_date_free (date);
|
g_date_free (date);
|
||||||
}
|
}
|
||||||
if (data[125] == 0) {
|
if (data[125] == 0 && data[126] != 0) {
|
||||||
gst_tag_extract_id3v1_string (list, GST_TAG_COMMENT, (gchar *) & data[97],
|
gst_tag_extract_id3v1_string (list, GST_TAG_COMMENT, (gchar *) & data[97],
|
||||||
28);
|
28);
|
||||||
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_TRACK_NUMBER,
|
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_TRACK_NUMBER,
|
||||||
|
|
Loading…
Reference in a new issue