diff src/madplug/plugin.c @ 1738:e1ebf3fc1a16

- follow the change of libaudid3tag.so's location. - little cleanup.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Wed, 19 Sep 2007 18:07:12 +0900
parents f35f9d6fcb6d
children 5fa26178eaef
line wrap: on
line diff
--- a/src/madplug/plugin.c	Wed Sep 19 18:00:10 2007 +0900
+++ b/src/madplug/plugin.c	Wed Sep 19 18:07:12 2007 +0900
@@ -520,10 +520,10 @@
             *title = g_strdup(tuple_get_string(myinfo.tuple, -1, "track-name"));
         else
             *title = g_strdup(url);
-        if(tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL) == -1)
+
+        *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL);
+        if(*length == -1)
             *length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS);
-        else
-            *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL);
     }
     else {
         *title = g_strdup(url);
@@ -553,10 +553,9 @@
     }
 
     if (input_get_info(&myinfo, info.remote ? TRUE : audmad_config.fast_play_time_calc) == TRUE) {
-        if(tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL) == -1)
+        *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL);
+        if(*length == -1)
             *length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS);
-        else
-            *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL);
     }
     else {
         *length = -1;