From 6f5e16f4ba36eedc3355f4b139f03144a8d0df55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 28 May 2006 10:05:47 +0000 Subject: [PATCH] tag: id3v2: A track/volume number or count of 0 does not make sense, just ignore it along with negati... Original commit message from CVS: * gst-libs/gst/tag/id3v2frames.c: (id3v2_tag_to_taglist): A track/volume number or count of 0 does not make sense, just ignore it along with negative numbers (a tag might only contain a track count without a track number). --- gst-libs/gst/tag/id3v2frames.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/tag/id3v2frames.c b/gst-libs/gst/tag/id3v2frames.c index f8c1453..8c20619 100644 --- a/gst-libs/gst/tag/id3v2frames.c +++ b/gst-libs/gst/tag/id3v2frames.c @@ -453,8 +453,8 @@ id3v2_tag_to_taglist (ID3TagsWorking * work, const gchar * tag_name, gint current, total; if (sscanf (tag_str, "%d/%d", ¤t, &total) == 2) { - if (total < 0) { - GST_WARNING ("Ignoring negative value for total %d in tag %s", + if (total <= 0) { + GST_WARNING ("Ignoring invalid value for total %d in tag %s", total, tag_name); } else { if (strcmp (tag_name, GST_TAG_TRACK_NUMBER) == 0) { @@ -472,9 +472,9 @@ id3v2_tag_to_taglist (ID3TagsWorking * work, const gchar * tag_name, break; } - if (current < 0) - GST_WARNING ("Ignoring negative value %d in tag %s", current, tag_name); - else { + if (current <= 0) { + GST_WARNING ("Ignoring invalid value %d in tag %s", current, tag_name); + } else { gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND, tag_name, current, NULL); } -- 2.7.4