changeset 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 d21c61c27373
children 8e1c653cd605
files ChangeLog src/madplug/decoder.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Feb 09 20:38:32 2007 -0800
+++ b/ChangeLog	Sat Feb 10 12:06:11 2007 -0800
@@ -1,3 +1,11 @@
+2007-02-10 04:38:32 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [1338]
+  - error code must be initialized.
+  
+  trunk/src/wma/libffwma/avio.c |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2007-02-10 03:38:32 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1336]
   - set CURLOPT_FOLLOWLOCATION to true, closes #771.
--- 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);