changeset 620:7a181a17f995 trunk

[svn] revise input_id3_get_string(): - make use of strcmp() - remove debug g_print()
author yaz
date Thu, 08 Feb 2007 01:14:33 -0800
parents ca4cd00ca0c8
children 1b50f674e0b9
files ChangeLog src/madplug/input.c
diffstat 2 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Feb 08 00:55:06 2007 -0800
+++ b/ChangeLog	Thu Feb 08 01:14:33 2007 -0800
@@ -1,3 +1,13 @@
+2007-02-08 08:55:06 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [1324]
+  - now title_override works.
+  
+  trunk/src/madplug/configure.c |    6 ++++++
+  trunk/src/madplug/decoder.c   |    5 ++---
+  trunk/src/madplug/plugin.c    |    1 +
+  3 files changed, 9 insertions(+), 3 deletions(-)
+
+
 2007-02-08 07:31:26 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [1322]
   - revise input_id3_get_string() to take encoding of field into account.
--- a/src/madplug/input.c	Thu Feb 08 00:55:06 2007 -0800
+++ b/src/madplug/input.c	Thu Feb 08 01:14:33 2007 -0800
@@ -273,9 +273,8 @@
 
     field = id3_frame_field(frame, 0);
     encoding = id3_field_gettextencoding(field);
-    g_print("encoding = %d\n", encoding);
 
-    if (frame_name == ID3_FRAME_COMMENT)
+    if (!strcmp(frame_name, ID3_FRAME_COMMENT))
         field = id3_frame_field(frame, 3);
     else
         field = id3_frame_field(frame, 1);
@@ -283,7 +282,7 @@
     if (!field)
         return NULL;
 
-    if (frame_name == ID3_FRAME_COMMENT)
+    if (!strcmp(frame_name, ID3_FRAME_COMMENT))
         string_const = id3_field_getfullstring(field);
     else
         string_const = id3_field_getstrings(field, 0);
@@ -293,7 +292,7 @@
 
     string = mad_ucs4dup((id3_ucs4_t *)string_const);
 
-    if (frame_name == ID3_FRAME_GENRE) {
+    if (!strcmp(frame_name, ID3_FRAME_GENRE)) {
         id3_ucs4_t *string2 = NULL;
         string2 = mad_parse_genre(string);
         g_free((void *)string);
@@ -302,17 +301,14 @@
 
     switch (encoding) {
     case ID3_FIELD_TEXTENCODING_ISO_8859_1:
-        g_print("latin1\n");
         rtn0 = id3_ucs4_latin1duplicate(string);
         break;
     case ID3_FIELD_TEXTENCODING_UTF_16:
     case ID3_FIELD_TEXTENCODING_UTF_16BE:
-        g_print("UTF16\n");
         rtn0 = id3_ucs4_utf16duplicate(string);
         break;
     case ID3_FIELD_TEXTENCODING_UTF_8:
     default:
-        g_print("UTF8\n");
         rtn0 = id3_ucs4_utf8duplicate(string);
         break;
     }