[gst-cvs] gst-plugins-base: gstid3tag: Don't extract a track number unless present.
Michael Smith
msmith at kemper.freedesktop.org
Tue May 19 18:15:40 PDT 2009
Module: gst-plugins-base
Branch: master
Commit: 35a9de28f425f80afaa195f13a74f0ba94cf3a6c
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=35a9de28f425f80afaa195f13a74f0ba94cf3a6c
Author: Michael Smith <msmith at songbirdnest.com>
Date: Tue May 19 18:10:55 2009 -0700
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.
---
gst-libs/gst/tag/gstid3tag.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gst-libs/gst/tag/gstid3tag.c b/gst-libs/gst/tag/gstid3tag.c
index 2ab433f..f50988e 100644
--- a/gst-libs/gst/tag/gstid3tag.c
+++ b/gst-libs/gst/tag/gstid3tag.c
@@ -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);
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],
28);
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_TRACK_NUMBER,
More information about the Gstreamer-commits
mailing list