diff src/madplug/plugin.c @ 1744:46cda76dcd2a

Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author William Pitcock <nenolod@atheme.org>
date Wed, 19 Sep 2007 09:06:52 -0500
parents e1ebf3fc1a16
children 5fa26178eaef
line wrap: on
line diff
--- a/src/madplug/plugin.c	Wed Sep 19 09:06:40 2007 -0500
+++ b/src/madplug/plugin.c	Wed Sep 19 09:06:52 2007 -0500
@@ -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;