diff src/madplug/decoder.c @ 627:8829833d37bc trunk

[svn] Break out of the loop once we know the length. No using spinning around all day.
author chainsaw
date Sat, 10 Feb 2007 12:06:11 -0800
parents ca4cd00ca0c8
children 8ed0af226d0e
line wrap: on
line diff
--- a/src/madplug/decoder.c	Fri Feb 09 20:38:32 2007 -0800
+++ b/src/madplug/decoder.c	Sat Feb 10 12:06:11 2007 -0800
@@ -209,7 +209,7 @@
 
         mad_stream_buffer(&stream, buffer, len + remainder);
 
-        while (1) {
+        while (info->duration.seconds == 0) {
             if (mad_header_decode(&header, &stream) == -1) {
                 if (stream.error == MAD_ERROR_BUFLEN) {
                     break;
@@ -311,7 +311,7 @@
                 g_message("using fast playtime calculation");
                 g_message("data used = %d [tagsize=%d framesize=%f]",
                           data_used, tagsize, frame_size);
-                g_message("frames = %d, frequecy = %d, channels = %d",
+                g_message("frames = %d, frequency = %d, channels = %d",
                           info->frames, info->freq, info->channels);
                 long millis = mad_timer_count(info->duration,
                                               MAD_UNITS_MILLISECONDS);