[tracker] A fix to TRCK handling in mp3 extractor
- From: Mikael Ottela <mottela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] A fix to TRCK handling in mp3 extractor
- Date: Mon, 22 Mar 2010 15:11:26 +0000 (UTC)
commit 8bb11b594f6fe9e19828a12628813bc8ff3b8dfb
Author: Mikael Ottela <mikael ottela ixonos com>
Date: Mon Mar 22 17:09:58 2010 +0200
A fix to TRCK handling in mp3 extractor
Don't assume TRCK fields are valid. Don't warn on tags we don't process
(it is nothing special)
src/tracker-extract/tracker-extract-mp3.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index f72c368..3a9e8cb 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -1281,9 +1281,9 @@ get_id3v24_tags (const gchar *data,
parts = g_strsplit (word, "/", 2);
if (parts[0]) {
tag->track_number = atoi (parts[0]);
- }
- if (parts[1]) {
- tag->track_count = atoi (parts[1]);
+ if (parts[1]) {
+ tag->track_count = atoi (parts[1]);
+ }
}
g_strfreev (parts);
g_free (word);
@@ -1298,7 +1298,6 @@ get_id3v24_tags (const gchar *data,
break;
default:
g_free (word);
- g_warn_if_reached ();
}
}
}
@@ -1424,6 +1423,7 @@ get_id3v23_tags (const gchar *data,
/* text frames */
word = id3v2_text_to_utf8 (data[pos], &data[pos + 1], csize - 1);
+
if (!tracker_is_empty_string (word)) {
g_strstrip (word);
}
@@ -1483,9 +1483,9 @@ get_id3v23_tags (const gchar *data,
parts = g_strsplit (word, "/", 2);
if (parts[0]) {
tag->track_number = atoi (parts[0]);
- }
- if (parts[1]) {
- tag->track_count = atoi (parts[1]);
+ if (parts[1]) {
+ tag->track_count = atoi (parts[1]);
+ }
}
g_strfreev (parts);
g_free (word);
@@ -1500,7 +1500,6 @@ get_id3v23_tags (const gchar *data,
break;
default:
g_free (word);
- g_warn_if_reached ();
}
}
}
@@ -1635,7 +1634,6 @@ get_id3v20_tags (const gchar *data,
break;
default:
g_free (word);
- g_warn_if_reached ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]