summaryrefslogtreecommitdiffstats
path: root/gst/id3demux
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-05-28 10:05:47 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-05-28 10:05:47 +0000
commite4bb4b892f6cadfb7abdb3e02de5168a5e5e89cb (patch)
tree03a6ad356c8d62643bbd00c2202c41703ea9d950 /gst/id3demux
parentfe03f3968ab0c9bd2319f4749c3dd7e0f1954640 (diff)
gst/id3demux/id3v2frames.c: A track/volume number or count of 0 does not make sense, just ignore it along with negati...
Original commit message from CVS: * gst/id3demux/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).
Diffstat (limited to 'gst/id3demux')
-rw-r--r--gst/id3demux/id3v2frames.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gst/id3demux/id3v2frames.c b/gst/id3demux/id3v2frames.c
index f8c14536..8c20619f 100644
--- a/gst/id3demux/id3v2frames.c
+++ b/gst/id3demux/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", &current, &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);
}