mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
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).
This commit is contained in:
parent
fe03f3968a
commit
e4bb4b892f
2 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-05-28 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* 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).
|
||||
|
||||
2006-05-27 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_init),
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue