changeset 2346:78a0e19530e2

allow madplug to compute mp3 duration when TLEN field is invalid. patch by Russell Yanofsky.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Mon, 04 Feb 2008 03:30:25 +0900
parents 0405c29fecf7
children 790fdbbb2156
files src/madplug/input.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/madplug/input.c	Sun Feb 03 00:06:33 2008 +0900
+++ b/src/madplug/input.c	Mon Feb 04 03:30:25 2008 +0900
@@ -408,7 +408,7 @@
 
     // length
     string = input_id3_get_string(info->tag, "TLEN");
-    if (string) {
+    if (string && atoi(string)) {
         aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, atoi(string));
         AUDDBG("input_read_tag: TLEN = %d\n", atoi(string));
         g_free(string);